diff --git a/pandora_console/godmode/um_client/index.php b/pandora_console/godmode/um_client/index.php index c6d1b6d69d..b8e03125a5 100644 --- a/pandora_console/godmode/um_client/index.php +++ b/pandora_console/godmode/um_client/index.php @@ -231,6 +231,21 @@ if (is_ajax() !== true) { } } } + + $PHPmemory_limit_min = config_return_in_bytes('800M'); + $PHPmemory_limit = config_return_in_bytes(ini_get('memory_limit')); + if ($PHPmemory_limit < $PHPmemory_limit_min && $PHPmemory_limit !== -1) { + $msg = __( + '\'%s\' recommended value is %s or greater. Please, change it on your PHP configuration file (php.ini) or contact with administrator', + 'memory_limit', + '800M' + ); + if (function_exists('ui_print_warning_message') === true) { + ui_print_warning_message($msg); + } else { + echo $msg; + } + } } // Load styles. @@ -366,21 +381,6 @@ if (is_array($config) === true) { } } -$PHPmemory_limit_min = config_return_in_bytes('800M'); -$PHPmemory_limit = config_return_in_bytes(ini_get('memory_limit')); -if ($PHPmemory_limit < $PHPmemory_limit_min && $PHPmemory_limit !== '-1') { - $msg = __( - '\'%s\' recommended value is %s or greater. Please, change it on your PHP configuration file (php.ini) or contact with administrator', - 'memory_limit', - '800M' - ); - if (function_exists('ui_print_warning_message') === true) { - ui_print_warning_message($msg); - } else { - echo $msg; - } -} - $ui = new Manager( ((is_array($config) === true) ? $pandora_url : 'http://'.$_SERVER['SERVER_ADDR'].'/'), ((is_array($config) === true) ? ui_get_full_url('ajax.php') : ''), diff --git a/pandora_console/godmode/um_client/lib/UpdateManager/Client.php b/pandora_console/godmode/um_client/lib/UpdateManager/Client.php index 3f76de4405..254e697425 100644 --- a/pandora_console/godmode/um_client/lib/UpdateManager/Client.php +++ b/pandora_console/godmode/um_client/lib/UpdateManager/Client.php @@ -941,7 +941,7 @@ class Client $queries = preg_split("/(;\n)|(;\n\r)/", $sql); foreach ($queries as $query) { if (empty($query) !== true) { - if (preg_match('/^\s*LOAD\s+(.*)$/i', $query, $matches) > 0) { + if (preg_match('/^\s*SOURCE\s+(.*)$/i', $query, $matches) > 0) { $filepath = dirname($mr_file).'/'.$matches[1]; if (file_exists($filepath) === true) { $query = file_get_contents($filepath); @@ -1342,14 +1342,14 @@ class Client function ($errno, $errstr) { throw new \Exception($errstr, $errno); }, - E_ERROR + (E_ALL ^ E_NOTICE) ); register_shutdown_function( function () { $error = error_get_last(); if (null !== $error - && $error['type'] === E_ERROR + && $error['type'] === (E_ALL ^ E_NOTICE) ) { echo __('Failed to analyze package: %s', $error['message']); } @@ -1434,7 +1434,7 @@ class Client function ($errno, $errstr) { throw new \Exception($errstr, $errno); }, - E_ERROR + (E_ALL ^ E_NOTICE) ); if ($package === null) {