Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PHP 8.2] Warnings in the log files during order placement #3184

Closed
ADDISON74 opened this issue Apr 16, 2023 · 11 comments
Closed

[PHP 8.2] Warnings in the log files during order placement #3184

ADDISON74 opened this issue Apr 16, 2023 · 11 comments

Comments

@ADDISON74
Copy link
Collaborator

ADDISON74 commented Apr 16, 2023

Use Magento Sample Pack. Add the following products to the cart "Alice in Wonderland" and "Falling by I am Not Lefthanded".

1. Cart Page - system.log file

2023-04-16T21:54:25+00:00 ERR (3): Deprecated functionality: strlen(): Passing null to parameter #1 ($string) of type string is deprecated  in /var/www/html/app/code/core/Mage/Downloadable/Helper/Catalog/Product/Configuration.php on line 59

2. Checkout - Onepage Billing Information - system.log file

2023-04-16T21:57:35+00:00 ERR (3): Deprecated functionality: Creation of dynamic property Mage_Paypal_Model_Config::$cctypes is deprecated  in /var/www/html/app/code/core/Mage/Paypal/Model/Config.php on line 781

3. Checkout - After placing the order - system.log file

2023-04-16T21:59:48+00:00 ERR (3): Deprecated functionality: trim(): Passing null to parameter #1 ($string) of type string is deprecated  in /var/www/html/app/code/core/Mage/SalesRule/Model/Rule.php on line 203
@fballiano
Copy link
Contributor

Hi @ADDISON74,

  1. should be done with Fixed deprecation warning in Mage_Downloadable_Helper_Catalog_Product_Configuration #3187
  2. can you check if you still get the error with Fixed logging too many exceptions for payment methods #3181? maybe that fix also fixes this one
  3. will do

@fballiano
Copy link
Contributor

@ADDISON74
Copy link
Collaborator Author

ADDISON74 commented Apr 17, 2023

For point 2, in my case #3181 it is not fixing it. Here is the system.log file content with that PR applied. I deleted the duplicated lines. There are more errors after finishing the checkout than I reported before, one is related to Google Analytics.

2023-04-17T14:16:57+00:00 ERR (3): Deprecated functionality: Creation of dynamic property Mage_Paypal_Model_Config::$visible_on_product is deprecated  in /var/www/html/app/code/core/Mage/Paypal/Model/Config.php on line 781
2023-04-17T14:16:57+00:00 ERR (3): Deprecated functionality: Creation of dynamic property Mage_Paypal_Model_Config::$active is deprecated  in /var/www/html/app/code/core/Mage/Paypal/Model/Config.php on line 781

2023-04-17T14:16:58+00:00 ERR (3): Deprecated functionality: imagecolorallocate(): Passing null to parameter #2 ($red) of type int is deprecated  in /var/www/html/lib/Varien/Image/Adapter/Gd2.php on line 276
2023-04-17T14:16:58+00:00 ERR (3): Deprecated functionality: imagecolorallocate(): Passing null to parameter #3 ($green) of type int is deprecated  in /var/www/html/lib/Varien/Image/Adapter/Gd2.php on line 276
2023-04-17T14:16:58+00:00 ERR (3): Deprecated functionality: imagecolorallocate(): Passing null to parameter #4 ($blue) of type int is deprecated  in /var/www/html/lib/Varien/Image/Adapter/Gd2.php on line 276

2023-04-17T14:17:06+00:00 ERR (3): Deprecated functionality: trim(): Passing null to parameter #1 ($string) of type string is deprecated  in /var/www/html/app/code/core/Mage/GiftMessage/Block/Message/Inline.php on line 245

2023-04-17T14:17:33+00:00 ERR (3): Deprecated functionality: Creation of dynamic property Mage_Paypal_Model_Config::$cctypes is deprecated  in /var/www/html/app/code/core/Mage/Paypal/Model/Config.php on line 781

2023-04-17T14:17:41+00:00 ERR (3): Deprecated functionality: strlen(): Passing null to parameter #1 ($string) of type string is deprecated  in /var/www/html/app/code/core/Mage/Downloadable/Helper/Catalog/Product/Configuration.php on line 59

2023-04-17T14:17:48+00:00 ERR (3): Deprecated functionality: strtoupper(): Passing null to parameter #1 ($string) of type string is deprecated  in /var/www/html/app/code/core/Mage/GoogleAnalytics/Block/Ga.php on line 213

@TangLiang
Copy link

same issue on OpenMage 20.1.0-rc3

2023-04-21T02:39:29+00:00 ERR (3): Deprecated functionality: Creation of dynamic property Mage_Paypal_Model_Config::$active is deprecated  in /home/wwwroot/lnmp01/domain/xxx.com/web/app/code/core/Mage/Paypal/Model/Config.php on line 782
2023-04-21T02:39:29+00:00 ERR (3): Deprecated functionality: Creation of dynamic property Mage_Paypal_Model_Config::$visible_on_cart is deprecated  in /home/wwwroot/lnmp01/domain/xxx.com/web/app/code/core/Mage/Paypal/Model/Config.php on line 782
2023-04-21T02:39:29+00:00 ERR (3): Deprecated functionality: Creation of dynamic property Mage_Paypal_Model_Config::$active is deprecated  in /home/wwwroot/lnmp01/domain/xxx.com/web/app/code/core/Mage/Paypal/Model/Config.php on line 782
2023-04-21T02:39:29+00:00 ERR (3): Deprecated functionality: Creation of dynamic property Mage_Paypal_Model_Config::$visible_on_cart is deprecated  in /home/wwwroot/lnmp01/domain/xxx.com/web/app/code/core/Mage/Paypal/Model/Config.php on line 782
2023-04-21T02:39:29+00:00 ERR (3): Deprecated functionality: Creation of dynamic property Mage_Paypal_Model_Config::$active is deprecated  in /home/wwwroot/lnmp01/domain/xxx.com/web/app/code/core/Mage/Paypal/Model/Config.php on line 782
2023-04-21T02:39:29+00:00 ERR (3): Deprecated functionality: strtolower(): Passing null to parameter #1 ($string) of type string is deprecated  in /home/wwwroot/lnmp01/domain/xxx.com/web/app/code/core/Mage/Catalog/Helper/Image.php on line 568
2023-04-21T02:39:29+00:00 ERR (3): Deprecated functionality: Creation of dynamic property Mage_Paypal_Model_Config::$visible_on_cart is deprecated  in /home/wwwroot/lnmp01/domain/xxx.com/web/app/code/core/Mage/Paypal/Model/Config.php on line 782
2023-04-21T02:39:29+00:00 ERR (3): Deprecated functionality: Creation of dynamic property Mage_Paypal_Model_Config::$active is deprecated  in /home/wwwroot/lnmp01/domain/xxx.com/web/app/code/core/Mage/Paypal/Model/Config.php on line 782
2023-04-21T02:39:29+00:00 ERR (3): Deprecated functionality: Creation of dynamic property Mage_Paypal_Model_Config::$visible_on_cart is deprecated  in /home/wwwroot/lnmp01/domain/xxx.com/web/app/code/core/Mage/Paypal/Model/Config.php on line 782
2023-04-21T02:39:29+00:00 ERR (3): Deprecated functionality: Creation of dynamic property Mage_Paypal_Model_Config::$active is deprecated  in /home/wwwroot/lnmp01/domain/xxx.com/web/app/code/core/Mage/Paypal/Model/Config.php on line 782

@fballiano
Copy link
Contributor

the paypal one has been fixed for sure, the image.php one should be fixed in #3201

@TangLiang
Copy link

TangLiang commented May 14, 2023

[PHP 8.2 - OpenMage 20.1.0-rc3] - this is not related to the current issue.

Deprecated functionality: preg_split(): Passing null to parameter #2 ($subject) of type string is deprecated in /app/code/core/Mage/Core/Helper/String.php on line 251

Deprecated functionality: iconv_strlen(): Passing null to parameter #1 ($string) of type string is deprecated in /app/code/core/Mage/Core/Helper/String.php on line 79

@ADDISON74
Copy link
Collaborator Author

[PHP 8.2] - this is not related to the current issue, but I found it in the system.log file today.

2023-05-13T14:08:02+00:00 ERR (3): Deprecated functionality: strtotime(): Passing null to parameter #1 ($datetime) of type string is deprecated  in /var/www/html/app/code/core/Mage/Cron/Model/Observer.php on line 223

@fballiano
Copy link
Contributor

[PHP 8.2 - OpenMage 20.1.0-rc3] - this is not related to the current issue.

Deprecated functionality: preg_split(): Passing null to parameter #2 ($subject) of type string is deprecated in /app/code/core/Mage/Core/Helper/String.php on line 251

Deprecated functionality: iconv_strlen(): Passing null to parameter #1 ($string) of type string is deprecated in /app/code/core/Mage/Core/Helper/String.php on line 79

this one is tricky, because it comes from the search engine... we shouldn't fix it in those 2 lines but above in the calls stack...

@fballiano
Copy link
Contributor

@TangLiang do you know how to reproduce the problem?

@TangLiang
Copy link

TangLiang commented May 15, 2023

@fballiano i just checked,it's cause by the third part extension,it not check the string is empty or exist before call Mage::help('core/string')->splitWords() and Mage::help('core/string')->strlen().
it's not magento bug. so sorry for this

@ADDISON74
Copy link
Collaborator Author

I am going to close this issue because I haven't found any more errors in the OpenMage log files. If they appear, a new report ticket can be created.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants