Title: Syntax error in PHP7.2
Last modified: June 25, 2024

---

# Syntax error in PHP7.2

 *  Resolved [t.inoue](https://wordpress.org/support/users/tinoue/)
 * (@tinoue)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/syntax-error-in-php7-2/)
 * Thanks for the great plugin.
   The following error occurs when uploading to version
   2.2.2 under PHP7.2.
 * Parse error: syntax error, unexpected ‘)’ in /wp-content/plugins/easy-fancybox/
   inc/class-easyfancybox-admin.php on line 693

Viewing 11 replies - 1 through 11 (of 11 total)

 *  Plugin Author [Firelight](https://wordpress.org/support/users/firelightwp/)
 * (@firelightwp)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/syntax-error-in-php7-2/#post-17849580)
 * Hi! Thanks for the report. This one is puzzling.
 * Normally, if that error existed, it should be there for everyone (the PHP version
   should not affect it). I just had a look at line 693 in that file, and there 
   is not an extra parenthesis there (there is a closing parenthesis, but it is 
   needed). I tried it against PHP 7 too, just to be sure.
 * Can I ask how you uploaded – did you click update from your WP dashboard or download
   a zip and upload manually?
 * I had prepped a change to apply PHP coding standards to this file. I was going
   to put that in the next release, but just as a safety measure, I will prepare
   a release with that shortly and deploy. In that file, both myself and PHP coding
   standards agree there are no issues.
 * Hopefully that will resolve things for you. If not, I may ask if there any chance
   you can copy the lines of code around that line in your version of the plugin
   so I can see them. But we can hold on that until after this release.. 
   That release
   should go out in the next hour.
 *  Plugin Author [Firelight](https://wordpress.org/support/users/firelightwp/)
 * (@firelightwp)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/syntax-error-in-php7-2/#post-17849591)
 * Oh, in the meantime, if that error is blocking your site, you can try re-downloading
   the plugin from the WordPress.org page, and uploading. It will ask you if you
   want to override the plugin files – just say yes. That will double check you 
   have all the right files and nothing went odd in your last update.
 *  [1callservice](https://wordpress.org/support/users/1callservice/)
 * (@1callservice)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/syntax-error-in-php7-2/#post-17849636)
 * We are getting this Fatal Error now as well since the update. Same **unexpected‘)’**
   error
 *  [1callservice](https://wordpress.org/support/users/1callservice/)
 * (@1callservice)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/syntax-error-in-php7-2/#post-17849645)
 * redownloading it fixed it. we use Installatron updater, which is what performed
   the overnight update and site was down. thanks
 *  Plugin Author [Firelight](https://wordpress.org/support/users/firelightwp/)
 * (@firelightwp)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/syntax-error-in-php7-2/#post-17849666)
 * Hmm. Well, that’s concerning.
 * I did just push a release that imposes full PHP coding standards on that file.
   Notably, the coding standards did not flag or force any changes to the line above.
   In any case, feel free to update and confirm the issue is still fixed.
 * I’m particularly concerned that using the updater may have generated an issue/
   message that’s not (a) consistent and (b) actually there in the code as far as
   I can see.
 * In any case, hopefully this update also resolves things for people.
 * Please definitely let me know if you continue to see any issues, and I’ll be 
   available to troubleshoot immediately.
 *  Thread Starter [t.inoue](https://wordpress.org/support/users/tinoue/)
 * (@tinoue)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/syntax-error-in-php7-2/#post-17850442)
 * Thank you for your response.
   The upload method was automatic plugin update.
 * When I installed Version2.2.3 from the WordPress administration screen by uploading
   a ZIP file, the plugin could not be activated due to the following error.
 * Parse error: syntax error, unexpected ‘)’ in /wp-content/plugins/easy-fancybox/
   inc/class-easyfancybox-admin.php on line 748
 * I have used the plugin quite a few times, and I checked all the sites, but there
   were 3 that had the same error, and it is below the configuration.
 * A Site | PHP7.2.34/WordPress 6.4.5
   B Site | PHP7.2.34/WordPress 6.2.6C Site |
   PHP7.2.34/WordPress 5.7.12
 *  Plugin Author [Firelight](https://wordpress.org/support/users/firelightwp/)
 * (@firelightwp)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/syntax-error-in-php7-2/#post-17850481)
 * [@tinoue](https://wordpress.org/support/users/tinoue/) – Are you saying that 
   you still have the error with the latest update?
 * If so, is there any way you could please copy the lines of code around that line
   and paste them here?
 * And I know you already did, but can you confirm if you go to the plugin pages,
   it says you have version 2.2.3?
    -  This reply was modified 1 year, 11 months ago by [Firelight](https://wordpress.org/support/users/firelightwp/).
 *  Plugin Author [Firelight](https://wordpress.org/support/users/firelightwp/)
 * (@firelightwp)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/syntax-error-in-php7-2/#post-17850487)
 * Actually, just to share from my side, here’s the code.
 * The challenge I’m having is that this code is simple, correct, and does not have
   a syntax error. Line 748 is the last line, and the closing parenthesis is required
   as the closing parenthesis for the wp_enqueue_script() call.
 *     ```wp-block-code
       wp_enqueue_script(  'firelight-block-js',  $block_js,  array( 'wp-blocks', 'wp-i18n', 'wp-element', 'wp-components', 'wp-editor', 'wp-hooks' ),  $version,  array( 'in_footer' => true ),);  // <- This is line 748. I cannot remove this closing paranthesis. 
       ```
   
 *  Plugin Author [Firelight](https://wordpress.org/support/users/firelightwp/)
 * (@firelightwp)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/syntax-error-in-php7-2/#post-17850497)
 * [@tinoue](https://wordpress.org/support/users/tinoue/) – Assuming you’re still
   having the issue, if you open to doing so, I might ask if you can reach out to
   us at firelightwp.com/contact. Just reference this thread. We can discuss some
   additional possible troubleshooting.
 *  Thread Starter [t.inoue](https://wordpress.org/support/users/tinoue/)
 * (@tinoue)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/syntax-error-in-php7-2/#post-17850695)
 * Thank you.
   Sent from firelightwp.com/contact
 *  Thread Starter [t.inoue](https://wordpress.org/support/users/tinoue/)
 * (@tinoue)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/syntax-error-in-php7-2/#post-17855097)
 * I was able to confirm the solution in version 2.2.5.
 * Thank you for your support many times.

Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘Syntax error in PHP7.2’ is closed to new replies.

 * ![](https://ps.w.org/easy-fancybox/assets/icon-256x256.png?rev=3188201)
 * [Firelight Lightbox](https://wordpress.org/plugins/easy-fancybox/)
 * [Support Threads](https://wordpress.org/support/plugin/easy-fancybox/)
 * [Active Topics](https://wordpress.org/support/plugin/easy-fancybox/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/easy-fancybox/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/easy-fancybox/reviews/)

 * 11 replies
 * 3 participants
 * Last reply from: [t.inoue](https://wordpress.org/support/users/tinoue/)
 * Last activity: [1 year, 11 months ago](https://wordpress.org/support/topic/syntax-error-in-php7-2/#post-17855097)
 * Status: resolved