FIXED Delete All fails on items/detail table with an error

Edwin

Member
1787418395388.png

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,
 

eugenio

Administrator
Staff member
Bug fixed in v13.6, released today.
The bug was related to the delete all feature in general and it was present even in older DaDaBIK version, however enabling error handling on v13.5 and using the default, strict, error mode, made the error appear and the execution of the script to stop.
 
Top