Parse error: syntax error, unexpected ‘)’ in api.php

[ad_1]

Hi Andreas,

It appears to be an issue of PHP 7.2 and earlier. But since you use PHP 8.0, I guess you may have edited the plugin files, or the plugin got corrupted while unzipping its installation package.

Please see if deleting the plugin and reinstalling it resolves the issue. No data of TSF will be lost in this process.

Hi Sybre,

I deleted and re-installed the plugin, but I see the same thing in the code.
I provide a screenshot here: https://badendouche.be/wp-content/uploads/2023/12/auto.png

Regards,
Andreas

Hi Andreas,

By “in the code” I assume that you only see the issue in the code editor — does the code parser you use run on or interpret as PHP 7.2 or earlier?

Does the plugin work on your site that uses PHP 8.0?

That is correct. Our hosting provider contacted me while doing some checks and said following;

[~/public_html]# wp plugin verify-checksums –all
Parse error: syntax error, unexpected ‘)’ in /wp-content/plugins/autodescription/inc/functions/api.php on line 117
A critical error … and so on.

On the backend part of the site I never noticed any issues, that’s why I don’t really understand why I’m getting contacted for this.

Regards

Hi Andreas,

Thank you for informing me about the process. It makes sense now.

You can safely ignore those warnings. That’s a dumb thing for the host to do: it’s worrying their customers for no good reason. PHP 7.3+ syntax is uncommon, but their warning system’s parser should’ve grown automatically with the PHP versions your site has installed.

Please inform your host about this issue.

Let me know if there’s anything else I can do for you. Have a lovely day!

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer