Title: syntax error, unexpected &#8216;=&gt;&#8217; (T_DOUBLE_ARROW)
Last modified: December 23, 2021

---

# syntax error, unexpected ‘=>’ (T_DOUBLE_ARROW)

 *  Resolved [ofrayechiel](https://wordpress.org/support/users/ofrayechiel/)
 * (@ofrayechiel)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/syntax-error-unexpected-t_double_arrow/)
 * Since the update to version 2.1.0 the plugin is creating these errors in the 
   log:
 * 2021-12-22T20:25:12+00:00 CRITICAL syntax error, unexpected ‘=>’ (T_DOUBLE_ARROW),
   expecting ‘)’ in /home/{…..}/public_html/wp-content/plugins/object-sync-for-salesforce/
   classes/class-object-sync-sf-sync-transients.php on line 57
 * Please help.
    I’ve disabled the plugin and the website is working again, but 
   I heavily rely on this plugin for functionality.
 * Thanks

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

 *  Thread Starter [ofrayechiel](https://wordpress.org/support/users/ofrayechiel/)
 * (@ofrayechiel)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/syntax-error-unexpected-t_double_arrow/#post-15190326)
 * Update:
    My server runs PHP version 7.3.15 (Supports 64bit values)
 * PHP manual states “Arrow functions were introduced in PHP 7.4 ”
 * Should I downgrade the plugin to the previous version?
 *  Plugin Author [Jonathan Stegall](https://wordpress.org/support/users/jonathanstegall/)
 * (@jonathanstegall)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/syntax-error-unexpected-t_double_arrow/#post-15191491)
 * Thank you, I clearly missed that. I’ve added a fix for this as version 2.1.1.
   If you upgrade to 2.1.1 and are still seeing that error, I can look for more,
   but I think I was able to quickly catch anything that is incorrectly excluding
   PHP versions older than 7.4.
 *  [supportnt](https://wordpress.org/support/users/supportnt/)
 * (@supportnt)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/syntax-error-unexpected-t_double_arrow/#post-15191975)
 * Hello,
 * After the upgrade to the 2.1.1 version, i have always the same error !
    My server
   is a Debian 10, with PHP 7.3. The errors is not solve apparently !
 * Got error ‘PHP message: PHP Parse error: syntax error, unexpected ‘=>’ (T_DOUBLE_ARROW),
   expecting ‘)’ in /home/molinari/www/wp-content/plugins/object-sync-for-salesforce/
   classes/class-object-sync-sf-sync-transients.php on line 5
 * Best regards
 *  Plugin Author [Jonathan Stegall](https://wordpress.org/support/users/jonathanstegall/)
 * (@jonathanstegall)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/syntax-error-unexpected-t_double_arrow/#post-15192037)
 * [@supportnt](https://wordpress.org/support/users/supportnt/) Does it really say“
   line 5”? There’s no code like that at line 5, so I’m curious if it is showing
   a different line of code that got cut off?
 *  [supportnt](https://wordpress.org/support/users/supportnt/)
 * (@supportnt)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/syntax-error-unexpected-t_double_arrow/#post-15192101)
 * Sorry, it’s the line 59 😉
    Bad copy-paste !
 * Best rergards
 *  Plugin Author [Jonathan Stegall](https://wordpress.org/support/users/jonathanstegall/)
 * (@jonathanstegall)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/syntax-error-unexpected-t_double_arrow/#post-15192154)
 * [@supportnt](https://wordpress.org/support/users/supportnt/) line 59 should only
   run if your PHP version is above 7.4. Can you add `error_log( 'php version is'.
   PHP_VERSION );` right above that line and report what it says? I’d like to find
   out why the detection isn’t working for you.
 *  Thread Starter [ofrayechiel](https://wordpress.org/support/users/ofrayechiel/)
 * (@ofrayechiel)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/syntax-error-unexpected-t_double_arrow/#post-15232667)
 * [@jonathanstegall](https://wordpress.org/support/users/jonathanstegall/) I believe
   you are correct that line 59 should only run on PHP >= 7.4, but I think PHP will
   try to compile the line in any case, and then the Syntax Error occurs. In other
   words, I don’t think the if clause will prevent the PHP 7.3 compiler from throwing
   the “CRITICAL syntax error, unexpected ‘=>’ (T_DOUBLE_ARROW)” and crashing the
   site.
 * I cannot find a better solution so I will try to upgrade my PHP version as soon
   as possible.
 *  [timr](https://wordpress.org/support/users/trohrer/)
 * (@trohrer)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/syntax-error-unexpected-t_double_arrow/#post-15257537)
 * My temporary workaround was to comment out the offending lines.
 * We have the same error. (Our server runs PHP 7.3.32 even though php 7.4 dates
   to 2018).
 * Unfortunately ofrayechiel is correct. When Zend added arrow functions in 7.4,
   it now throws errors in the syntax parser of existing, older versions of PHP.
 * I think the only viable long term solution for us is to upgrade to at least PHP
   7.4. But even 7.4 is already in end of life security fix mode, and Zend is now
   developing PHP 8.0.
 * In the short term, if this new arrow syntax is necessary to run on 7.4 (I do 
   not believe that this is the case–I know them from js, where arrow functions 
   are a convenient shorthand), the plugin probably should now state it requires
   php 7.4.
    -  This reply was modified 4 years, 4 months ago by [timr](https://wordpress.org/support/users/trohrer/).
    -  This reply was modified 4 years, 4 months ago by [timr](https://wordpress.org/support/users/trohrer/).
 *  Plugin Author [Jonathan Stegall](https://wordpress.org/support/users/jonathanstegall/)
 * (@jonathanstegall)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/syntax-error-unexpected-t_double_arrow/#post-15264735)
 * I did not realize the arrow functions were still being parsed. I’ll release a
   version that removes them as soon as I can (trying to figure out if there is 
   another bug in this release that needs to be addressed first); I certainly don’t
   think it’s essential to have them in the plugin.
 *  Plugin Author [Jonathan Stegall](https://wordpress.org/support/users/jonathanstegall/)
 * (@jonathanstegall)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/syntax-error-unexpected-t_double_arrow/#post-15330138)
 * To give an update on this, I’ve released a version 2.1.2 that I believe fixes
   many, and possibly all, of the reported issues with 2.1.1. I’m not going to close
   this (or the others) yet, to give folks some time to verify whether the issues
   are still happening.
 *  Plugin Author [Jonathan Stegall](https://wordpress.org/support/users/jonathanstegall/)
 * (@jonathanstegall)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/syntax-error-unexpected-t_double_arrow/#post-15395635)
 * I’m going to go ahead and close these 2.1.1-specific issues with the assumption
   that 2.1.2 is working well for folks.

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

The topic ‘syntax error, unexpected ‘=>’ (T_DOUBLE_ARROW)’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/object-sync-for-salesforce.svg)
 * [Object Sync for Salesforce](https://wordpress.org/plugins/object-sync-for-salesforce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/object-sync-for-salesforce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/object-sync-for-salesforce/)
 * [Active Topics](https://wordpress.org/support/plugin/object-sync-for-salesforce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/object-sync-for-salesforce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/object-sync-for-salesforce/reviews/)

## Tags

 * [typo](https://wordpress.org/support/topic-tag/typo/)

 * 11 replies
 * 4 participants
 * Last reply from: [Jonathan Stegall](https://wordpress.org/support/users/jonathanstegall/)
 * Last activity: [4 years, 3 months ago](https://wordpress.org/support/topic/syntax-error-unexpected-t_double_arrow/#post-15395635)
 * Status: resolved