robertbell Posted September 10, 2022 Posted September 10, 2022 When I manually set an order status to processing, either from within the order or from the unsettled order list, the status does not change and no page is returned. The error log says: Today, 14:01 [<strong>Exception</strong>] /home/sojourn1/public_html/modules/gateway/Card_Capture/gateway.class.php:24 - Attempt to modify property "basket" on null https://www.sojourner.biz/admin_xxxxxxx.php?_g=orders&action=edit&order_id=220910-115803-6481&source=dashboard Today, 14:00 [<strong>Exception</strong>] /home/sojourn1/public_html/modules/gateway/Card_Capture/gateway.class.php:24 - Attempt to modify property "basket" on null https://www.sojourner.biz/admin_xxxxxxx.php?_g=orders&action=edit&order_id=220910-115803-6481&source=dashboard Today, 14:00 [<strong>Exception</strong>] /home/sojourn1/public_html/modules/gateway/Card_Capture/gateway.class.php:24 - Attempt to modify property "basket" on null https://www.sojourner.biz/admin_xxxxxxx.php?_g=orders&action=edit&order_id=220910-115803-6481&source=dashboard Today, 13:58 [<strong>Exception</strong>] /home/sojourn1/public_html/modules/gateway/Card_Capture/gateway.class.php:24 - Attempt to modify property "basket" on null https://www.sojourner.biz/admin_xxxxxxx.php?_g=orders&redirect=dashboard Today, 13:57 [<strong>Exception</strong>] /home/sojourn1/public_html/modules/gateway/Card_Capture/gateway.class.php:24 - Attempt to modify property "basket" on null https://www.sojourner.biz/admin_xxxxxxx.php?_g=orders&action=edit&order_id=220910-115803-6481&source=dashboard Today, 13:57 [<strong>Exception</strong>] /home/sojourn1/public_html/modules/gateway/Card_Capture/gateway.class.php:24 - Attempt to modify property "basket" on null https://www.sojourner.biz/admin_xxxxxxx.php?_g=orders&action=edit&order_id=220910-115803-6481&source=dashboard Today, 13:56 [<strong>Deprecated</strong>] /home/sojourn1/public_html/admin_2T68Ql/sources/orders.index.inc.php:307 - str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated https://www.sojourner.biz/admin_xxxxxxx.php?_g=orders&action=edit&order_id=220910-115803-6481&source=dashboard str_replace
bsmither Posted September 10, 2022 Posted September 10, 2022 This has been revealed because PHP8 is less forgiving than PHP7. We will look for a solution.
bsmither Posted September 10, 2022 Posted September 10, 2022 For a work-around, please try this: In /classes/order.class.php: Near line 501, find: if(!empty($order_summary['gateway']) && file_exists(CC_ROOT_DIR.'/modules/gateway/'.$order_summary['gateway'].'/gateway.class.php')) { Change to: if(isset($GLOBALS['cart']) && !empty($order_summary['gateway']) && file_exists(CC_ROOT_DIR.'/modules/gateway/'.$order_summary['gateway'].'/gateway.class.php')) {
robertbell Posted September 10, 2022 Author Posted September 10, 2022 Thanks for your help. but nope. Then I can't even view the order. Reverted.
robertbell Posted September 10, 2022 Author Posted September 10, 2022 Sorry Today, 16:39 [<strong>Exception</strong>] /home/sojourn1/public_html/classes/order.class.php:66 - Attempt to modify property "basket" on null https://www.sojourner.biz/admin_xxxxxxx.php?_g=orders&action=edit&order_id=220910-115803-6481&source=dashboard Today, 16:39 [<strong>Exception</strong>] /home/sojourn1/public_html/classes/order.class.php:66 - Attempt to modify property "basket" on null https://www.sojourner.biz/admin_xxxxxxx.php?_g=orders&action=edit&order_id=220910-115803-6481&source=dashboard Today, 16:39 [<strong>Exception</strong>] /home/sojourn1/public_html/classes/order.class.php:66 - Attempt to modify property "basket" on null https://www.sojourner.biz/admin_xxxxxxx.php?_g=orders&action=edit&order_id=220910-115803-6481&source=dashboard Today, 16:30 [<strong>Deprecated</strong>] /home/sojourn1/public_html/classes/session.class.php:676 - strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated https://172.96.187.225:443/ Today, 16:30 [<strong>Deprecated</strong>] /home/sojourn1/public_html/classes/session.class.php:676 - htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated https://172.96.187.225:443/ Today, 16:30 [<strong>Deprecated</strong>] /home/sojourn1/public_html/classes/session.class.php:676 - strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated https://172.96.187.225:443/ Today, 16:30 [<strong>Deprecated</strong>] /home/sojourn1/public_html/classes/session.class.php:676 - htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated https://172.96.187.225:443/ Today, 16:30 [<strong>Deprecated</strong>] /home/sojourn1/public_html/classes/user.class.php:719 - strtolower(): Passing null to parameter #1 ($string) of type string is deprecated https://172.96.187.225:443/ Today, 16:30 [<strong>Deprecated</strong>] /home/sojourn1/public_html/classes/debug.class.php:260 - strstr(): Passing null to parameter #1 ($haystack) of type string is deprecated https://172.96.187.225:443/ Today, 16:07 [<strong>Deprecated</strong>] /home/sojourn1/public_html/classes/session.class.php:676 - strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated http:///phpMyAdmin/scripts/setup.php Today, 16:07 [<strong>Deprecated</strong>] /home/sojourn1/public_html/classes/session.class.php:676 - htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated http:///phpMyAdmin/scripts/setup.php Today, 16:07 [<strong>Deprecated</strong>] /home/sojourn1/public_html/classes/session.class.php:676 - strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated http:///phpMyAdmin/scripts/setup.php Today, 16:07 [<strong>Deprecated</strong>] /home/sojourn1/public_html/classes/session.class.php:676 - htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated http:///phpMyAdmin/scripts/setup.php Today, 16:07 [<strong>Deprecated</strong>] /home/sojourn1/public_html/classes/debug.class.php:260 - strstr(): Passing null to parameter #1 ($haystack) of type string is deprecated http:///phpMyAdmin/scripts/setup.php Today, 16:07 [<strong>Deprecated</strong>] /home/sojourn1/public_html/classes/session.class.php:676 - strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated http:///pma/scripts/setup.php Today, 16:07 [<strong>Deprecated</strong>] /home/sojourn1/public_html/classes/session.class.php:676 - htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated http:///pma/scripts/setup.php Today, 16:07 [<strong>Deprecated</strong>] /home/sojourn1/public_html/classes/session.class.php:676 - strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated http:///pma/scripts/setup.php
bsmither Posted September 10, 2022 Posted September 10, 2022 In your file: /classes/order.class.php, line 66, please show what the statement is for that line. This is what I have for lines 64-66: if (!defined('ORDER_PROCESS')) { define('ORDER_PROCESS', self::ORDER_PROCESS); }
robertbell Posted September 10, 2022 Author Posted September 10, 2022 I've got: if (!defined('ORDER_PROCESS')) { define('ORDER_PROCESS', self::ORDER_PROCESS); }
bsmither Posted September 10, 2022 Posted September 10, 2022 I don't understand why PHP would complain "Attempt to modify property "basket" on null" for these lines. Very strange! FYI: this error does not happen for me.
bsmither Posted September 10, 2022 Posted September 10, 2022 Because there is this expression on line 81: if(isset($GLOBALS['cart'])) { then by adding the new piece of code to line 501, there should be no problem. In fact, your recent error log points to a problem on line 66 in the order.class.php file - not in the gateway.class.php file as seen in the first post. In the order.class.php file, lines 59-78, a comment suggests that these lines can be removed. If you choose to re-instate the edit on line 501, and then also remove lines 59-78, please let us know what happens.
robertbell Posted September 11, 2022 Author Posted September 11, 2022 Thanks. It seems to be working now, although there are still a bunch errors about deprecated functions. Would you advise switching back to PHP 7.4?
bsmither Posted September 11, 2022 Posted September 11, 2022 Resolving the 'deprecation' errors is an ongoing effort. Many issues were resolved in CC647 with many more resolved in the upcoming CC648. Please know that even if a statement throws a 'deprecated' error message, the statement still executes its functionality just as it did in PHP7.4. To quiet the reporting of these messages, disable CubeCart's Debug mode (admin, Store Settings, Advanced tab).
robertbell Posted September 11, 2022 Author Posted September 11, 2022 Debug has been set to disabled. Since things seem to be working, I'll stick with PHP v8.1.x and wait for the next version of Cubecart. Thanks for your help.
Al Brookbanks Posted December 5, 2022 Posted December 5, 2022 Thanks for this guys. I got my head around it.
robertbell Posted December 5, 2022 Author Posted December 5, 2022 FWIW, there were two other issues that led me to switch back to PHP 7.4.x: customers could no longer check out, and there were absurdly long delays in editing any product.
bsmither Posted December 5, 2022 Posted December 5, 2022 Was there a conversation on the forums for the "editing any product" issue?
bsmither Posted December 5, 2022 Posted December 5, 2022 I recall a conversation from many years ago (but I can't find it) where the complaint was a delay after bringing a product up for editing. The cause was determined to be the product's Image (and to a lesser degree Digital) tab's FilePicker getting the AJAX response for populating the list with the folders and files. CubeCart was doing a lot of work - especially if the list of folders and files counted in the hundreds. If this is your experience, using your browser's Developer's Tools, Network screen, you can see how long the XHR request took.
robertbell Posted December 5, 2022 Author Posted December 5, 2022 This was only with PHP 8, and I've reverted to 7.4 because customers could not check out.
bsmither Posted December 5, 2022 Posted December 5, 2022 Only with PHP8? Interesting. Was the delay at the time I noted? Or was the delay you experienced at some other point in the product editing task? Such as getting to the next page after Saving?
robertbell Posted December 5, 2022 Author Posted December 5, 2022 The delay was on page load or re-load after edit. And it was especially pronounced on any browser I tried (Chrome, Firefox, Vivaldi) on Android 13.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.