PHP errors and warnings. PC 5 beta51. PHP 8.3

Phoca Cart - complex e-commerce extension
User avatar
sulpher
Phoca Enthusiast
Phoca Enthusiast
Posts: 99
Joined: 28 Feb 2017, 09:45

PHP errors and warnings. PC 5 beta51. PHP 8.3

Post by sulpher »

AH01071: Got error 'PHP message: PHP Warning: Trying to access array offset on null in /var/www/administrator/components/com_phocacart/libraries/phocacart/order/order.php on line 2968;

PHP message: PHP Warning: Trying to access array offset on null in /var/www/administrator/components/com_phocacart/libraries/phocacart/order/order.php on line 2969;

PHP message: PHP Warning: Trying to access array offset on null in /var/www/administrator/components/com_phocacart/libraries/phocacart/order/order.php on line 2970;

PHP message: PHP Warning: Trying to access array offset on null in /var/www/administrator/components/com_phocacart/libraries/phocacart/order/order.php on line 2971;

PHP message: PHP Warning: Trying to access array offset on null in /var/www/administrator/components/com_phocacart/libraries/phocacart/order/order.php on line 2972;

PHP message: PHP Warning: Attempt to read property "date" on null in /var/www/administrator/components/com_phocacart/libraries/phocacart/order/status.php on line 131;

PHP message: PHP Warning: Attempt to read property "order_number" on null in /var/www/administrator/components/com_phocacart/libraries/phocacart/order/status.php on line 131;
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48005
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: PHP errors and warnings. PC 5 beta51. PHP 8.3

Post by Jan »

Hi, are you 100% your database table structure is complete?

Do you have following columns in table "phocacart_orders"?

tracking_date_shipped
invoice_date
invoice_due_date
invoice_time_of_supply
required_delivery_time

Jan
If you find Phoca extensions useful, please support the project
User avatar
sulpher
Phoca Enthusiast
Phoca Enthusiast
Posts: 99
Joined: 28 Feb 2017, 09:45

Re: PHP errors and warnings. PC 5 beta51. PHP 8.3

Post by sulpher »

Yes, all these columns exist in table.
It was clean installation of PC5 beta51 on J5.1.0.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48005
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: PHP errors and warnings. PC 5 beta51. PHP 8.3

Post by Jan »

This is hard to say because when the columns are loaded from DB, they should be included in the array/object. Where exactly do you get these errors?

Jan
If you find Phoca extensions useful, please support the project
User avatar
sulpher
Phoca Enthusiast
Phoca Enthusiast
Posts: 99
Joined: 28 Feb 2017, 09:45

Re: PHP errors and warnings. PC 5 beta51. PHP 8.3

Post by sulpher »

I can't remember what I did that lead to these issues. I tested payment plugins. WIll take more attention during the next testing.

Btw, is there a situation that some outdated code in the payment plugin leads to these warnings?
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48005
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: PHP errors and warnings. PC 5 beta51. PHP 8.3

Post by Jan »

These are errors inside core libraries, so yes, it is possible that some obsolete plugin can invoke it but the core should somehow protect from this. But on the mentioned lines, the code goes directly from database, so the variables should be loaded there. :idea:

Jan
If you find Phoca extensions useful, please support the project
Post Reply