Open ibnuhalimm opened 2 years ago
It says the error on Controllers/VoyagerBaseController.php
on line 757.
...
foreach ($rows as $row) {
if ($row->type == 'multiple_images') {
$images_to_remove = json_decode($data->getOriginal($row->field), true) ?? [];
} else {
$images_to_remove = [$data->getOriginal($row->field)];
}
foreach ($images_to_remove as $image) {
// Remove only $single_image if we are removing from bread edit
...
I've checked that the $images_to_remove
variable contains array data, but the error shows like the $images_to_remove
is not an array.
Maybe it's bug of php7.3
Laravel version
6.20.44
PHP version
7.3.27
Voyager version
1.5.2
Database
MySQL 5.7.37
Description
I'm getting 500 error message "Invalid argument supplied for foreach()" while trying to delete an image of "multiple image" field.
Steps to reproduce
Expected behavior
Response success, and image file should be deleted
Screenshots
Additional context
No response