Title: Fatal Error: `Parse error: syntax error, unexpected &#8216;)&#8217;` in multiple files
Last modified: March 25, 2022

---

# Fatal Error: `Parse error: syntax error, unexpected ‘)’` in multiple files

 *  Resolved [KZeni](https://wordpress.org/support/users/kzeni/)
 * (@kzeni)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/fatal-error-parse-error-syntax-error-unexpected-in-files/)
 * I have a site that updated to the latest version (4.10.0) and now has a site-
   wide fatal error. The exact error is:
    `Parse error: syntax error, unexpected')'
   in /wp-content/plugins/zero-bs-crm/includes/class-learn-menu.php on line 89`
 * It appears there’s a comma used in a set of function parameters where it’s included
   even after the last attribute which then causes a fatal error on some PHP versions(
   ex. PHP version 7.2.x & possibly others [with this plugin stating it currently
   supports PHP version 5.6.x and above.])
 * In effect, we need:
 *     ```
       // render generic learn menu with content
       $this->render_generic_learn_menu(
       	$learn_menu_settings['title'],
       	$learn_menu_settings['add_new'],
       	'',
       	( !isset( $learn_menu_settings['hide'] ) ? true : false ),
       	$learn_menu_settings['title'],
       	$learn_menu_settings['content'],
       	$learn_menu_settings['url'],
       	$this->get_image_url( $learn_menu_settings['img'] ),
       	$learn_menu_settings['video'],
       	'',
       	'',
       	( !empty( $learn_menu_settings['video_title'] ) ? $learn_menu_settings['video_title'] : ''),
       );
       ```
   
 * to instead be:
 *     ```
       // render generic learn menu with content
       $this->render_generic_learn_menu(
       	$learn_menu_settings['title'],
       	$learn_menu_settings['add_new'],
       	'',
       	( !isset( $learn_menu_settings['hide'] ) ? true : false ),
       	$learn_menu_settings['title'],
       	$learn_menu_settings['content'],
       	$learn_menu_settings['url'],
       	$this->get_image_url( $learn_menu_settings['img'] ),
       	$learn_menu_settings['video'],
       	'',
       	'',
       	( !empty( $learn_menu_settings['video_title'] ) ? $learn_menu_settings['video_title'] : '')
       );
       ```
   
 * *Notice the removal of the last comma in the function parameters which was already
   unnecessary & simply causes an avoidable fatal error given certain setups.
 * There’s also:
    `Parse error: syntax error, unexpected ')' in /wp-content/plugins/
   zero-bs-crm/includes/ZeroBSCRM.AJAX.php on line 1028`
 * Where that similarly needs to go from:
 *     ```
       // Only raw checked... but proceed. (ADD or Update?) (if $zbsNoteIDtoUpdate = -1 it'll add, else it'll overwrite)
       $res = zeroBS_addUpdateLog(
       	$zbsNoteAgainstPostID,
       	$zbsNoteIDtoUpdate,
       	-1,
       	array(
       		// Anything here will get wrapped into an array and added as the meta vals
       		'type'      => $zbsNoteType,
       		'shortdesc' => $zbsNoteShortDesc,
       		'longdesc'  => $zbsNoteLongDesc,
       	),
       	$zbsNoteObjType,
       );
       ```
   
 * to instead be:
 *     ```
       // Only raw checked... but proceed. (ADD or Update?) (if $zbsNoteIDtoUpdate = -1 it'll add, else it'll overwrite)
       $res = zeroBS_addUpdateLog(
       	$zbsNoteAgainstPostID,
       	$zbsNoteIDtoUpdate,
       	-1,
       	array(
       		// Anything here will get wrapped into an array and added as the meta vals
       		'type'      => $zbsNoteType,
       		'shortdesc' => $zbsNoteShortDesc,
       		'longdesc'  => $zbsNoteLongDesc,
       	),
       	$zbsNoteObjType
       );
       ```
   
 * Again, it’s that last comma that’s unnecessary while causing a fatal PHP error
   for some PHP versions.
 * Additionally, there’s:
    `Parse error: syntax error, unexpected ')' in /wp-content/
   plugins/zero-bs-crm/includes/ZeroBSCRM.AJAX.php on line 1098`
 * Which should go from:
 *     ```
       // Only raw checked... but proceed. (Update?) (if $zbsNoteIDtoUpdate = -1 it'll add, else it'll overwrite)
       $newOrUpdatedLogID = zeroBS_addUpdateLog(
       	$zbsNoteAgainstPostID,
       	$zbsNoteID,
       	-1,
       	array(
       		// Anything here will get wrapped into an array and added as the meta vals
       		'type'      => $zbsNoteType,
       		'shortdesc' => $zbsNoteShortDesc,
       		'longdesc'  => $zbsNoteLongDesc,
       	),
       	$zbsNoteObjType,
       );
       ```
   
 * to instead be:
 *     ```
       // Only raw checked... but proceed. (Update?) (if $zbsNoteIDtoUpdate = -1 it'll add, else it'll overwrite)
       $newOrUpdatedLogID = zeroBS_addUpdateLog(
       	$zbsNoteAgainstPostID,
       	$zbsNoteID,
       	-1,
       	array(
       		// Anything here will get wrapped into an array and added as the meta vals
       		'type'      => $zbsNoteType,
       		'shortdesc' => $zbsNoteShortDesc,
       		'longdesc'  => $zbsNoteLongDesc,
       	),
       	$zbsNoteObjType
       );
       ```
   
 * I think that’s all of the occurrences of this problem as I patched these and 
   found it no longer having a site-wide server error.

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

 *  [Alba](https://wordpress.org/support/users/ctdealba/)
 * (@ctdealba)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/fatal-error-parse-error-syntax-error-unexpected-in-files/#post-15496335)
 * Hi [@kzeni](https://wordpress.org/support/users/kzeni/)
 * Thanks for letting us know about the site-wide fatal error and the steps you 
   took to patch it on your end.
 * I have escalated this issue with our development team, and they will take the
   necessary steps to fix it.
 * Let us know if we can help with anything else.
 * Best,
    Alba
 *  Plugin Author [bradshawtm](https://wordpress.org/support/users/bradshawtm/)
 * (@bradshawtm)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/fatal-error-parse-error-syntax-error-unexpected-in-files/#post-15497047)
 * Hi again! We’ve released 4.10.1, which should address this error. Thanks for 
   the quick report. :^)
 *  Thread Starter [KZeni](https://wordpress.org/support/users/kzeni/)
 * (@kzeni)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/fatal-error-parse-error-syntax-error-unexpected-in-files/#post-15497050)
 * Thanks for the swift response & update!

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

The topic ‘Fatal Error: `Parse error: syntax error, unexpected ‘)’` in multiple 
files’ is closed to new replies.

 * ![](https://ps.w.org/zero-bs-crm/assets/icon.svg?rev=2821636)
 * [Jetpack CRM - Clients, Leads, Invoices, Billing, Email Marketing, & Automation](https://wordpress.org/plugins/zero-bs-crm/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/zero-bs-crm/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/zero-bs-crm/)
 * [Active Topics](https://wordpress.org/support/plugin/zero-bs-crm/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/zero-bs-crm/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/zero-bs-crm/reviews/)

 * 3 replies
 * 3 participants
 * Last reply from: [KZeni](https://wordpress.org/support/users/kzeni/)
 * Last activity: [4 years, 2 months ago](https://wordpress.org/support/topic/fatal-error-parse-error-syntax-error-unexpected-in-files/#post-15497050)
 * Status: resolved