From 01ead0c97ab28d6b1f77648cab90b3f8298d4395 Mon Sep 17 00:00:00 2001 From: Jean-Christian Denis Date: Tue, 1 Feb 2022 21:39:38 +0100 Subject: [PATCH] fix module info --- inc/class.dc.packman.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/inc/class.dc.packman.php b/inc/class.dc.packman.php index fa8ae84..a03dce1 100644 --- a/inc/class.dc.packman.php +++ b/inc/class.dc.packman.php @@ -93,11 +93,15 @@ class dcPackman $themes->requireDefine($cache, $zip_root_dir); $res[$i] = $themes->getModules($zip_root_dir); } - $res[$i]['id'] = $zip_root_dir; - $res[$i]['root'] = $root . '/' . $zip_file; + if (is_array($res[$i])) { + $res[$i] = array_merge($res[$i], [ + 'id' => $zip_root_dir, + 'root' => $root . '/' . $zip_file + ]); - unlink($cache . '_define.php'); - $i++; + unlink($cache . '_define.php'); + $i++; + } } return $res;