- Posts: 460
- Thank you received: 19
Error after updating to php 8.1.22
- Reincidente
-
Topic Author
- Offline
Less
More
3 years 3 weeks ago #354856
by Reincidente
Error after updating to php 8.1.22 was created by Reincidente
-- Error-message(debug-mod must be tuned on) -- : Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in /home/customer/www/domain.es/public_html/media/com_hikashop/mail/payment_notification.preload.php on line 193
Hi.
A few days ago I updated my site's PHP to version 8.1.22.
Since then I have detected errors in the customer address fields, as well as in the payment confirmation emails.
I attach a screenshot of errors.
Hi.
A few days ago I updated my site's PHP to version 8.1.22.
Since then I have detected errors in the customer address fields, as well as in the payment confirmation emails.
I attach a screenshot of errors.
Please Log in or Create an account to join the conversation.
3 years 3 weeks ago #354869
by nicolas
Replied by nicolas on topic Error after updating to php 8.1.22
Hi,
For the first screenshot, change the line:
to:
in the file media/com_hikashop/mail/payment_notification.preload.php and it will remove these.
We'll add the change on our end for the next version.
Regarding the other screenshot, I don't see the file path in full in your screenshot, so I can't say what to do.
Could you please provide the full path where the deprecated message happens, like you did for the other deprecated message in the email ?
For the first screenshot, change the line:
Code:
if(empty($item->$namekey) && !strlen($item->$namekey)) continue;
Code:
if(empty($item->$namekey) && !strlen((string)$item->$namekey)) continue;
We'll add the change on our end for the next version.
Regarding the other screenshot, I don't see the file path in full in your screenshot, so I can't say what to do.
Could you please provide the full path where the deprecated message happens, like you did for the other deprecated message in the email ?
Please Log in or Create an account to join the conversation.
- Reincidente
-
Topic Author
- Offline
Less
More
- Posts: 460
- Thank you received: 19
3 years 3 weeks ago #354879
by Reincidente
Replied by Reincidente on topic Error after updating to php 8.1.22
Hi.
/home/customer/www/domain.es/public_html/administrator/components/com_hikashop/classes/address.php on line 698
(in address - front)
/home/customer/www/domain.es/public_html/administrator/components/com_hikashop/classes/address.php on line 698
(in address - front)
Please Log in or Create an account to join the conversation.
- Reincidente
-
Topic Author
- Offline
Less
More
- Posts: 460
- Thank you received: 19
3 years 3 weeks ago #354882
by Reincidente
Replied by Reincidente on topic Error after updating to php 8.1.22
Another URL with error.
/home/customer/www/domain.es/public_html/administrator/components/com_hikashop/classes/address.php on line 729
/home/customer/www/domain.es/public_html/administrator/components/com_hikashop/classes/address.php on line 698
/home/customer/www/domain.es/public_html/administrator/components/com_hikashop/classes/address.php on line 729
/home/customer/www/domain.es/public_html/administrator/components/com_hikashop/classes/address.php on line 698
Please Log in or Create an account to join the conversation.
3 years 3 weeks ago #354897
by nicolas
Replied by nicolas on topic Error after updating to php 8.1.22
Hi,
In the file administrator/components/com_hikashop/classes/address.php search for the code:
you'll find it on 3 places. In each place, add
just after it to get:
and it will remove these deprecated messages.
We'll add the changes on our end too for the next version.
PS: note that these are not errors. They are messages for developers to update their code for future versions of PHP.
Normally, these deprecated messages shouldn't appear on a live website. So that means that you probably want to check with your hosting why these are being displayed and how to not have deprecated messages.
In the file administrator/components/com_hikashop/classes/address.php search for the code:
Code:
str_replace('{'.$fieldname.'}',
Code:
(string)
Code:
str_replace('{'.$fieldname.'}',(string)
We'll add the changes on our end too for the next version.
PS: note that these are not errors. They are messages for developers to update their code for future versions of PHP.
Normally, these deprecated messages shouldn't appear on a live website. So that means that you probably want to check with your hosting why these are being displayed and how to not have deprecated messages.
Please Log in or Create an account to join the conversation.
- Reincidente
-
Topic Author
- Offline
Less
More
- Posts: 460
- Thank you received: 19
3 years 3 weeks ago #354901
by Reincidente
Replied by Reincidente on topic Error after updating to php 8.1.22
Solved.
Thanks.
Thanks.
Please Log in or Create an account to join the conversation.
Time to create page: 0.189 seconds