sgladstone/com.fountaintribe.hebrewcalendarhelper

Fatal error after changing PHP from Version 5.6 to 7.1

Closed this issue · 8 comments

PHP Interpreter was set to version 7.1 from 5.6

Fatal error: Uncaught Error: Call to undefined function split() in /home/cremorne/www/www/devwp2/wp-content/xxcustom/com.fountaintribe.hebrewcalendarhelper-3.2.2/com.fountaintribe.hebrewcalendarhelper-3.2.2/utils/HebrewCalendar.php:4269 Stack trace: #0 /home/cremorne/www/www/devwp2/wp-content/xxcustom/com.fountaintribe.hebrewcalendarhelper-3.2.2/com.fountaintribe.hebrewcalendarhelper-3.2.2/utils/HebrewCalendar.php(3639): HebrewCalendar->util_convert2hebrew_date('2018', '8', '2', '1', 'yy') #1 /home/cremorne/www/www/devwp2/wp-content/xxcustom/com.fountaintribe.hebrewcalendarhelper-3.2.2/com.fountaintribe.hebrewcalendarhelper-3.2.2/CRM/Hebrewcalendarhelper/Form/Search/YahrzeitSearch.php(191): HebrewCalendar->util_convert_today2hebrew_date('yy') #2 /home/cremorne/www/www/devwp2/wp-content/plugins/civicrm/civicrm/CRM/Contact/Form/Search/Custom.php(129): CRM_Hebrewcalendarhelper_Form_Search_YahrzeitSearch->buildForm(Object(CRM_Contact_Form_Search_Custom)) #3 /home/cremorne/www/www/devwp2/wp-content/plugins/civicrm/civicrm/CRM/ in /home/cremorne/www/www/devwp2/wp-content/xxcustom/com.fountaintribe.hebrewcalendarhelper-3.2.2/com.fountaintribe.hebrewcalendarhelper-3.2.2/utils/HebrewCalendar.php on line 4269

Can you help please?
Regards
Garry

Sarah,
Bit more research and found the following on the PHP site (see http://php.net/manual/en/function.split.php):

split
(PHP 4, PHP 5)

split — Split string into array by regular expression

Warning
This function was DEPRECATED in PHP 5.3.0, and REMOVED in PHP 7.0.0.

Alternatives to this function include:

preg_split()
explode()
str_split()

This is fixed in version 3.2.4 of this extension.

Thanks Sarah so much for your quick fix...really appreciated! Tested and all OK now!

Make sure to run the scheduled CiviCRM job that flushes and re-populates the yahrzeit temp table. (You can do this from the CiviCRM Admin area for scheduled jobs)

reran job and got the following error:
Warning: A non-numeric value encountered in /home/cremorne/www/www/devwp2/wp-content/xxcustom/com.fountaintribe.hebrewcalendarhelper-3.2.4/com.fountaintribe.hebrewcalendarhelper-3.2.4/utils/HebrewCalendar.php on line 3765

MySQL table "civicrm_fountaintribe_yahrzeits_temp" data looks alright. Just cannot rerun the Calculate without the warnings above.

Try version 3.2.5

Thanks and tested 'Calculate' and error gone. Data looks good.