
Hi Eugenio,
When using the standard Delete All function on an items/detail table, the operation fails with the following error:
foreach() argument must be of type array|object, null given
The error occurs in:
include/business_logic.php
During:
delete_multiple_records()
Example URL:
index.php?tablename=quotation_lines&function=delete_all&where_clause=...
The last known SQL query shown in the error message is:
DELETE FROM `quotation_lines`
WHERE `quotation_lines`.`quotation_id` = '50'
However, the records are not actually deleted.
A normal single-record delete works correctly.
The issue is reproducible with all custom delete hooks disabled, so it appears to occur in the standard DaDaBIK delete_all / delete_multiple_records() logic.
Expected behavior
All detail records matching the where_clause should be deleted.
Actual behavior
The operation fails with:
foreach() argument must be of type array|object, null given
And no records are deleted.
Can you have a look please.
Thanks!
Best,