Weird error and problem when updating one particular product
Posted: Fri Oct 31, 2025 2:58 pm
We have one product, that has been on the website for many years which every time we update the stock gives a "This age is not working" error after increasing the stock. The funny thing is the product does update.
The error in the error logs is the following
ChatGPT come up with the following as a reason for the error.
The error in the error logs is the following
Line 52 in the file is[31-Oct-2025 14:38:52 Europe/London] PHP Fatal error: Uncaught TypeError: array_filter(): Argument #1 ($array) must be of type array, null given in /#####/#####/#####/includes/system/versioned/1.0.5.1/customer.php:52
Stack trace:
#0 /#####/#####/#####/includes/system/versioned/1.0.5.1/customer.php(52): array_filter()
#1 /#####/#####/#####/includes/system/versioned/1.0.5.1/customer.php(79): customer->fetch_address()
#2 /#####/#####/#####/includes/system/versioned/1.0.5.1/customer.php(97): customer->fetch_to_address()
#3 /#####/######/#####/includes/modules/outgoing/update_stock.php(46): customer->get()
#4 /#####/railways/#####/includes/hooks/admin/catalog/injectQueue.php(34): osC_Outgoing_update_stock::system_add()
#5 /#####/#####/#####/includes/system/versioned/1.0.8.1/hooks.php(150): hook_admin_catalog_injectQueue->listen_updateProductAction()
#6 /#####/#####/#####/#####/includes/segments/process_action.php(20): hooks->cat()
#7 /#####/#####/#####/#####/catalog.php(32): require('/home/#####/...')
#8 {main}
thrown in /#####/#####/#####/includes/system/versioned/1.0.5.1/customer.php on line 52
Code: Select all
$this->data[$to] = array_filter($address_query->fetch_assoc(), function ($v) { return !Text::is_empty($v); });Is anyone able to shed any light on this error and problem.Why it only happens for that product
That’s the interesting part.
It’s not actually the product that’s wrong — it’s more likely:
That particular product is included in an old queue entry or linked to a missing customer record (e.g. a historical order or stock sync event).
When you update its stock, a hook fires that tries to update an external system (through osC_Outgoing_update_stock::system_add()), and that hook requests customer details — even though none exist.
So the “product update works” (stock changes saved), but the queue creation fails because the hook crashes while trying to build the message payload.