sync
authorjohn <john@roojs.com>
Tue, 2 Oct 2018 10:08:30 +0000 (18:08 +0800)
committerjohn <john@roojs.com>
Tue, 2 Oct 2018 10:08:30 +0000 (18:08 +0800)
UpdateDatabase.php
UpdateDatabase/VerifyExtensions.php

index 70693bb..9164a21 100644 (file)
@@ -200,7 +200,8 @@ class Pman_Core_UpdateDatabase extends Pman
         $json = json_decode($response, true);
         
         if(empty($json['data']) || $json['data'] != 'DONE'){
-            echo $response. "\n";
+            echo "\nError: Missing php extensions:\n";
+            print_r($json['errorMsg']);
             echo "Please install the above extensions and restart the apache.\n";
             exit;
         }
index 10763a5..89dc1d3 100644 (file)
@@ -15,7 +15,7 @@ class Pman_Core_UpdateDatabase_VerifyExtensions extends Pman
     
     function get($base, $opts = array())
     {
-        $extensions = $error = array();
+        $extensions = array();
         
         $ff = HTML_FlexyFramework::get();
         
@@ -35,13 +35,15 @@ class Pman_Core_UpdateDatabase_VerifyExtensions extends Pman
             }
         }
         
+        $error = '';
+        
         foreach ($extensions as $e){
             
             if(extension_loaded($e)) {
                 continue;
             }
             
-            $error[] = "Error: Please install php extension: {$e}";
+            $error .= "$e\n";
         }
         
         if(!empty($error)) {