Fatal Error in Envato Wordpress Toolkit - Website down

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?

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

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

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

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.

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.

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

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

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: