Fatal Error in Envato Wordpress Toolkit - Website down


#1

Hi everybody.
A few minutes ago I had to realise my website is down, showing just an error message:

Fatal error: syntax error, unexpected ‘new’ (T_NEW) in /homepages/38/d25784990/htdocs/wp-content/plugins/envato-wordpress-toolkit/index.php on line 207

I can’t reach my website neither my backend. It’s my agencies website.
I’ve always kept the whole site updated (unless there has been an update the past 2 weeks when I was sick).

I’m using the latest version of wordpress with Silicone-theme by Laborator Themes (a few years now) and never had any problems.

Everything around line 207 is about the envato API I don’t use.

Please, can anyone help?


#2

On line 207 do you see an & symbol before the “new”?

If so, remove the & symbol and see if it works.


#3

$this->protected_api =& new Envato_Protected_API( $user_name, $api_key );


#4

Yep, just get rid of the “&” like this:

$this->protected_api = new Envato_Protected_API( $user_name, $api_key );

“=&” has been deprecated for like 12 years so it’s pretty odd that it’s still there.


#5

OK, I’ll try.
But when it has been deprecated already 12 years ago, why does the error just comes up now?
And where does it came from so suddenly?

Let me see. I’ll tell you.


#6

Oh YEAH. It works.
Where the #### did it come from?

Thank you very much.
Wish you a merry christmas :grinning::+1:


#7

No problem. It seems that you may have recently upgraded to PHP 7.0+? It was deprecated, but still working, in PHP 5, and was completely removed in PHP 7.

Merry Christmas to you too! :slight_smile: