Fatal error: Parse error: syntax error, unexpected ‘)’ in src/Gutenberg.php
-
src/Gutenberg.php
currently has (as of version 4.4.12 just now):wp_register_script( 'dlm_gutenberg_blocks', plugins_url( '/assets/blocks/dist/blocks.js', download_monitor()->get_plugin_file() ), $asset_file['dependencies'], $asset_file['version'], );
and it appears the last comma is unnecessary while also then causing a site-wide fatal server error for some sites (might be PHP 7.2 related or something similar.)
The error that’s returned is the following:
Parse error: syntax error, unexpected ')' in /wp-content/plugins/download-monitor/src/Gutenberg.php on line 30
Simply removing that already unnecessary comma fixes this error for those setups.
wp_register_script( 'dlm_gutenberg_blocks', plugins_url( '/assets/blocks/dist/blocks.js', download_monitor()->get_plugin_file() ), $asset_file['dependencies'], $asset_file['version'] );
Might need to be a hotfix as sites that auto-update to this are going down because of it.
Viewing 9 replies - 1 through 9 (of 9 total)
Viewing 9 replies - 1 through 9 (of 9 total)
- The topic ‘Fatal error: Parse error: syntax error, unexpected ‘)’ in src/Gutenberg.php’ is closed to new replies.