PHP Deprecated: Non-static method ozpost::ozp_cfg_select_option() should not be stati
Hope I'm posting this in the right place.
Zencart version 1.5.7c
I am getting the following debug error pop up when turning ozpost postage module on/off.
[15-May-2021 04:21:39 Australia/Melbourne] Request URI: /ADMIN/index.php?cmd=modules&set=shipping&module=ozpost&action=edit, IP address: 111.208.204.181
#1 eval() called at [/users/MYSITE/public_html/ADMIN/modules.php:335]
#2 require(/users/MYSITE/public_html/ADMIN/modules.php) called at [/users/MYSITE/public_html/ADMIN/index.php:11]
--> PHP Deprecated: Non-static method ozpost::ozp_cfg_select_option() should not be called statically in /users/MYSITE/public_html/ADMIN/modules.php(335) : eval()'d code on line 1.
modules.php line 335
Is there a left parenthesis missing??
Re: PHP Deprecated: Non-static method ozpost::ozp_cfg_select_option() should not be s
Quote:
Originally Posted by
VacuumDog
modules.php line 335
Is there a left parenthesis missing??
No, the left-parenthesis is in the module's defined helper function as described in the db. That's normal.
Re: PHP Deprecated: Non-static method ozpost::ozp_cfg_select_option() should not be s
Quote:
Originally Posted by
VacuumDog
PHP Deprecated: Non-static method ozpost::ozp_cfg_select_option() should not be called statically
Probably the ozpost module shouldn't be using the :: syntax for calling the function.
Re: PHP Deprecated: Non-static method ozpost::ozp_cfg_select_option() should not be s
While not familiar with the particular plugin's internals, I have resolved something like this before by modifying the code in the affected area from:
Code:
ozpost::ozp_cfg_select_option()
to:
Code:
$oz_var = new ozpost;
$oz_var->ozp_cfg_select_option();
Now mind you in the above, I don't know if there are parameters that are part of the class' method or if there is some assignment being done, etc... But, doing something like the above allowed generating a variable that could be used to call the non-static method. There may be other solutions as well. Unfortunately the original author is no longer available to update the plugin.