Page 1 of 1

tep_guarantee_subarray error

Posted: Sat Sep 25, 2021 3:34 am
by Portman
Hi... I am upgrading my site from 1.0.7.12 to 1.0.7.13 at the moment...

I have noticed this depreciation error repeated multiple times in my error log;

Code: Select all

PHP Deprecated:  The tep_guarantee_subarray function has been deprecated. in .../includes/system/versioned/1.0.7.other/1.0.7.12/guarantor.php on line 43
this seemed to me to be a forced error to prevent a further problem so I deleted it to see what happened and I got this error;

Code: Select all

PHP Fatal error:  Uncaught Error: Call to undefined method Guarantor::guarantee_all() in .../includes/system/versioned/1.0.7.other/1.0.7.12/hooks.php:76
Stack trace:
#0 .../includes/system/versioned/1.0.7.other/1.0.7.12/hooks.php(128): hooks->load('system', 'system')
#1 .../includes/application_top.php(32): hooks->register('system')
#2 .../index.php(13): require('/home/devcreat/...')
#3 {main}
  thrown in .../includes/system/versioned/1.0.7.other/1.0.7.12/hooks.php on line 76
Do I have to worry about this error or can I just leave it running in the background? - Obviously the depreciated error not the secondary one.

Thanks

Re: tep_guarantee_subarray error

Posted: Sat Sep 25, 2021 4:45 am
by ecartz
You can do any of

1. Ignore the deprecation notice.
2. Turn off deprecation notices in your error_reporting in configure.php.
3. Change in the code, all tep_guarantee_subarray to Guarantor::guarantee_subarray

Of the three, only the last will continue to work after 1.0.9.0. It is the approach that I would recommend. But I would expect any should be fine until then.

There are no usages of the tep_guarantee functions in core since: https://github.com/CE-PhoenixCart/Phoen ... 1206548222 and https://github.com/CE-PhoenixCart/Phoen ... fb12e4284b

Re: tep_guarantee_subarray error

Posted: Sun Sep 26, 2021 6:09 am
by Portman
thanks @ecartz I'll do that