cividesk / com.cividesk.email.sparkpost

This extension allows CiviCRM to send emails and process bounces through the SparkPost service.
10 stars 30 forks source link

sparkpost_civicrm_check: correct version check function (critical for 5.0) #58

Closed mlutfy closed 6 years ago

mlutfy commented 6 years ago

In 5.0, the global function checkVersion() cannot be called anymore, or at least, the template is not always loaded, so the function is not defined.

When accessing the CiviCRM dashboard, I had a fatal error: Error: Call to undefined function civicrmVersion() in sparkpost_civicrm_check() (line 171 of sparkpost.php).

This PR replaces it by CRM_Utils_System::version().

nganivet commented 6 years ago

@mlutfy Is this going to break compatibility with previous versions? This extension is indicated as compatible all the way back to 4.4.

mlutfy commented 6 years ago

@nganivet CRM_Utils_System::version() also exists in 4.4 and works in the same/equivalent way as in 4.7 / 5.0.

nganivet commented 6 years ago

@mlutfy Thanks, merged.