Parse Error when updating or installing SparkPost 1.4
WordPress: 5.9.2 CiviCRM Version: 5.48.1 PHP Version: 4.74.1
Attempting to install SparkPost 1.4 gets the below critical error in WordPress:
Parse error: syntax error, unexpected ';' in /public_html/wp-content/uploads/civicrm/ext/com.cividesk.email.sparkpost/CRM/Sparkpost/Upgrader.php on line 107
When viewing line 106 of com.cividesk.email.sparkpost/CRM/Sparkpost/Upgrader.php it looks like there is a missing close brackets. The code is:
106 if (!self::canbeStored($key, $cryptoRegistry) {
I tried to change this to:
106 if (!self::canbeStored($key, $cryptoRegistry)) {
I now get this error:
Fatal error: Uncaught TypeError: Argument 1 passed to CRM_Admin_Page_Extensions::createExtendedInfo() must be an instance of CRM_Extension_Info, null given, called in /public_html/wp-content/plugins/civicrm/civicrm/CRM/Admin/Form/Extensions.php on line 74 and defined in /public_html/wp-content/plugins/civicrm/civicrm/CRM/Admin/Page/Extensions.php:332
Stack trace:
#0 /public_html/wp-content/plugins/civicrm/civicrm/CRM/Admin/Form/Extensions.php(74): CRM_Admin_Page_Extensions::createExtendedInfo(NULL)
#1 /public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Form.php(668): CRM_Admin_Form_Extensions->preProcess()
#2 /public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/QuickForm/Action/Display.php(76): CRM_Core_Form->buildForm()
#3 /public_html/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Display->perform(Object(CRM_Admin_Form_Extensions), 'display')
#4 / in /public_html/wp-content/plugins/civicrm/civicrm/CRM/Admin/Page/Extensions.php on line 332
Edited by JonGold