Proper fix for vUndefined when updating plugins/themes

This commit is contained in:
Djamil Legato
2019-03-13 13:14:39 -07:00
parent 10b7090c6a
commit e3fc4ce6f8
2 changed files with 11 additions and 0 deletions

View File

@@ -903,6 +903,16 @@ class AdminController extends AdminBaseController
$gpm = new GravGPM($flush);
$resources_updates = $gpm->getUpdatable();
foreach ($resources_updates as $key => $update) {
if (!is_iterable($update)) {
continue;
}
foreach ($update as $slug => $item) {
$resources_updates[$key][$slug] = $item->toArray();
}
}
if ($gpm->grav !== null) {
$grav_updates = [
'isUpdatable' => $gpm->grav->isUpdatable(),