tep_guarantee_subarray error

Open to all! Ask other shopowners for help.
Post Reply
User avatar
Portman
Contributor
Posts: 158
Joined: Mon Mar 08, 2021 1:04 am
Phoenix Version: v1.0.8.20
Has thanked: 29 times
Been thanked: 4 times

tep_guarantee_subarray error

Post 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


Join The Code Co-op to get access to your library in the Code Co-op Forum
ecartz
Core Team
Posts: 3084
Joined: Tue Nov 05, 2019 6:02 pm
Phoenix Version:
Has thanked: 4 times
Been thanked: 208 times

Re: tep_guarantee_subarray error

Post 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
User avatar
Portman
Contributor
Posts: 158
Joined: Mon Mar 08, 2021 1:04 am
Phoenix Version: v1.0.8.20
Has thanked: 29 times
Been thanked: 4 times

Re: tep_guarantee_subarray error

Post by Portman »

thanks @ecartz I'll do that


Join The Code Co-op to get access to your library in the Code Co-op Forum
Post Reply