-
Notifications
You must be signed in to change notification settings - Fork 36
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 Warning: Undefined array key "new" in v8.0.1 #793
Comments
Thanks for filing this issue @brnbs. I haven't had a chance to replicate it yet, however based on the error message I think I know what's happening. The You'll notice that the third param is Based on that I think this error occurs when a related object cache is deleted. Given it's the The fix (maybe) 🛠 In short I think we need to make a change to the How to replicate this? I think you'd have to delete the |
Thanks for the response @james-allan, we had some caching issues previously and got a suggestion here: #707 (comment) One thing to add: in the meantime, we switched from Redis-based cache to Automattic/wp-cache-memcached but we observed similar strange caching issues, so we are still using the 'wcs_force_read_renewal_order_data' hook recommended by @mattallan By the way, I’m uncertain about the recommended (most compatible) object caching solution for WooCommerce/WC Subscriptions. Any insights would be appreciated. |
@brnbs Just following up that I haven't been able to replicate by deleting a subscription user. Do you have a full stack trace of the error, that might help explain the flow that leads to it. If not, it's probably still worth us defending against this error by making sure we have the We can do something similar to Given I cannot replicate I'm going to give this a low priority for now. |
Found this similar to this one: #502 |
Describe the bug
After updating to WC Subscriptions 7.2.1 (Core 8.0.1) the following error message appears in the server log multiple times:
[php:warn] [pid 45:tid 45] [client 127.0.0.1:36334] PHP Warning: Undefined array key "new" in /var/www/web/app/plugins/woocommerce-subscriptions/vendor/woocommerce/subscriptions-core/includes/class-wcs-object-data-cache-manager-many-to-one.php on line 36
woocommerce-subscriptions-core/includes/class-wcs-object-data-cache-manager-many-to-one.php
Line 36 in c1a0d3d
To Reproduce
I just updated the plugin from 6.7.0 and enabled HPOS on the store. Not sure if the HPOS change is relevant.
Expected behavior
No warning message in the logs.
Actual behavior
I don't see any change in the actual behavior, but it might affect performance due to caching.
Product impact
Additional context
The log contains the requester IP address:
[client 127.0.0.1:36334]
. Therefore, I believe this warning occurs during a cron execution.The text was updated successfully, but these errors were encountered: