Syntax Error while uploading images

Posted in: Newspaper
Post count: 2

Hello everyone! I’m setting up my wordpress site, and everything was just peachy until thursday. I didn’t knowingly install any new plugins nor did I update anything, but for some reason, if I try to upload any images, I get the following error:

“Parse error: syntax error, unexpected T_STRING, expecting T_CONSTANT_ENCAPSED_STRING or ‘(‘ in /home/fazen862/public_html/wp-content/plugins/gif-image-resize/Bbpp_Animated_Gif.php on line 2”

Everything else on the site seems to be working perfectly, and the images I have uploaded before are just peachy. I originally noticed this while trying to upload my logo in newspaper. I already combed through the official wordpress foruns looking to similar situations, and I’ve already went through some solutions, but none of them solved the problem: I’ve double checked that I didnt install any new plugins since I last uploaded images and I’ve double checked the ftp file permissions. I don’t even know if this error is in Newspaper or in WordPress, but I’ve seen people with similar error that just had to change one character in the mentioned line in their .php file and it fixed the error, but I couldn’t code my way out of a wet paperbag using sharp scissors… Can anyone help me?

This is the beginning of the code in the aforementioned file (I’m pretty sure Line 2 is included in there):

<?php

use gdenhancer\GDEnhancer;

class Bbpp_Animated_Gif extends WP_Image_Editor_GD {

public $image_animated_gif = null;

public function save( $filename = null, $mime_type = null ) {

$is_animated_gif = GifFrameExtractor::isAnimatedGif($this->file);

if (!$is_animated_gif) {

return parent::save($filename, $mime_type);

}

$saved = $this->_save_animated_gif( $this->image_animated_gif, $filename, $mime_type );

if ( ! is_wp_error( $saved ) ) {

$this->file = $saved[‘path’];

$this->mime_type = $saved[‘mime-type’];

}

return $saved;

}

Post count: 6600

Hi,

Not sure how you can fix this but this error comes from Gif Image Resize plugin. Please try to disable it or remove it and check again.
I suggest you also contact plugin’s developer for further help.

Thanks

Viewing 2 posts - 1 through 2 (of 2 total)
The forum ‘Newspaper’ is closed to new topics and replies.