Merge branch 'ent-7842-error-al-actualizar-server-con-update-manager-offline' into 'develop'
Ent 7842 error al actualizar server con update manager offline See merge request artica/pandorafms!4323
This commit is contained in:
commit
9be1755650
|
@ -70,6 +70,10 @@ if (empty($license) === true) {
|
|||
}
|
||||
|
||||
$mode_str = '';
|
||||
if (isset($mode) === false) {
|
||||
$mode = null;
|
||||
}
|
||||
|
||||
if ($mode === Manager::MODE_ONLINE) {
|
||||
$mode_str = 'online';
|
||||
} else if ($mode === Manager::MODE_OFFLINE) {
|
||||
|
|
|
@ -1340,18 +1340,17 @@ class Client
|
|||
error_reporting(E_ALL ^ E_NOTICE);
|
||||
set_error_handler(
|
||||
function ($errno, $errstr) {
|
||||
if (preg_match('/Undefined index/', $errstr) > 1) {
|
||||
return;
|
||||
}
|
||||
|
||||
throw new \Exception($errstr, $errno);
|
||||
}
|
||||
},
|
||||
E_ERROR
|
||||
);
|
||||
|
||||
register_shutdown_function(
|
||||
function () {
|
||||
$error = error_get_last();
|
||||
if (null !== $error) {
|
||||
if (null !== $error
|
||||
&& $error['type'] === E_ERROR
|
||||
) {
|
||||
echo __('Failed to analyze package: %s', $error['message']);
|
||||
}
|
||||
}
|
||||
|
@ -1434,7 +1433,8 @@ class Client
|
|||
set_error_handler(
|
||||
function ($errno, $errstr) {
|
||||
throw new \Exception($errstr, $errno);
|
||||
}
|
||||
},
|
||||
E_ERROR
|
||||
);
|
||||
|
||||
if ($package === null) {
|
||||
|
|
|
@ -1,38 +1,54 @@
|
|||
<?php
|
||||
// Pandora FMS - http://pandorafms.com
|
||||
// ==================================================
|
||||
// Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public License
|
||||
// as published by the Free Software Foundation; version 2
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
/**
|
||||
* @package Include
|
||||
* @subpackage Config
|
||||
* Configuraton sample file.
|
||||
*
|
||||
* @category Config
|
||||
* @package Pandora FMS
|
||||
* @subpackage Community
|
||||
* @version 1.0.0
|
||||
* @license See below
|
||||
*
|
||||
* ______ ___ _______ _______ ________
|
||||
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
|
||||
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
|
||||
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
|
||||
*
|
||||
* ============================================================================
|
||||
* Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
|
||||
* Please see http://pandorafms.org for full contribution list
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation for version 2.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
* ============================================================================
|
||||
*/
|
||||
|
||||
// Default values
|
||||
// $config["dbname"]="pandora";
|
||||
// $config["dbuser"]="pandora";
|
||||
// $config["dbpass"]="pandora";
|
||||
// $config["dbhost"]="localhost";
|
||||
// This is used for reporting, please add "/" character at the end
|
||||
// $config["homedir"]="/var/www/pandora_console/";
|
||||
// $config["homeurl"]="/pandora_console/";
|
||||
// $config["auth"]["scheme"] = "mysql";
|
||||
|
||||
/**
|
||||
* Do not display any ERROR
|
||||
/*
|
||||
* Default values
|
||||
* $config["dbname"]="pandora";
|
||||
* $config["dbuser"]="pandora";
|
||||
* $config["dbpass"]="pandora";
|
||||
* $config["dbhost"]="localhost";
|
||||
*
|
||||
*
|
||||
* This is used for reporting, please add "/" character at the end
|
||||
* $config["homedir"]="/var/www/pandora_console/";
|
||||
* $config["homeurl"]="/pandora_console/";
|
||||
* $config["auth"]["scheme"] = "mysql";
|
||||
*/
|
||||
|
||||
// By default report any error but notices.
|
||||
error_reporting(E_ALL ^ E_NOTICE);
|
||||
|
||||
/*
|
||||
* Uncomment to display only critical errors.
|
||||
* error_reporting(E_ERROR);
|
||||
* Uncomment to display none errors.
|
||||
* error_reporting(0);
|
||||
*/
|
||||
error_reporting(E_ALL);
|
||||
|
||||
// Display ALL errors
|
||||
// error_reporting(E_ERROR);
|
||||
$ownDir = dirname(__FILE__).DIRECTORY_SEPARATOR;
|
||||
require $ownDir.'config_process.php';
|
||||
|
|
Loading…
Reference in New Issue