Browse Source

[FIX] Check if method exists in update.php script

Fix so we could use update.php with the previous version of system
where this method was not present
Adam Bukowski 2 years ago
parent
commit
4ffc65324b
1 changed files with 8 additions and 1 deletions
  1. 8
    1
      update.php

+ 8
- 1
update.php View File

@@ -340,7 +340,14 @@ class EpesiUpdate
340 340
         define('CID', false);
341 341
         require_once 'include.php';
342 342
         require_once 'include/backups.php';
343
-        ModuleManager::enable_modules(ModuleManager::MODULE_NOT_FOUND);
343
+
344
+        // Enable all disabled modules
345
+        //     check if method exists, because we recommend to use this update
346
+        //     script on older installations where method was not present
347
+        if (method_exists('ModuleManager', 'enable_modules')) {
348
+            ModuleManager::enable_modules(ModuleManager::MODULE_NOT_FOUND);
349
+        }
350
+
344 351
         ModuleManager::load_modules();
345 352
         Base_LangCommon::load();
346 353
 

Loading…
Cancel
Save