mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2026-07-08 09:23:03 +02:00
Proper fix for vUndefined when updating plugins/themes
This commit is contained in:
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user