mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
Always ignopre undefined indexes notices
This commit is contained in:
parent
1cbda1ce15
commit
f83fddb4ff
@ -1340,7 +1340,7 @@ class Client
|
|||||||
error_reporting(E_ALL ^ E_NOTICE);
|
error_reporting(E_ALL ^ E_NOTICE);
|
||||||
set_error_handler(
|
set_error_handler(
|
||||||
function ($errno, $errstr) {
|
function ($errno, $errstr) {
|
||||||
if (preg_match('/Undefined index/', $errstr) > 1) {
|
if (preg_match('/Undefined index/i', $errstr) > 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1351,7 +1351,9 @@ class Client
|
|||||||
register_shutdown_function(
|
register_shutdown_function(
|
||||||
function () {
|
function () {
|
||||||
$error = error_get_last();
|
$error = error_get_last();
|
||||||
if (null !== $error) {
|
if (null !== $error
|
||||||
|
&& preg_match('/Undefined index/i', $error['message']) !== 1
|
||||||
|
) {
|
||||||
echo __('Failed to analyze package: %s', $error['message']);
|
echo __('Failed to analyze package: %s', $error['message']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1433,7 +1435,7 @@ class Client
|
|||||||
error_reporting(E_ALL ^ E_NOTICE);
|
error_reporting(E_ALL ^ E_NOTICE);
|
||||||
set_error_handler(
|
set_error_handler(
|
||||||
function ($errno, $errstr) {
|
function ($errno, $errstr) {
|
||||||
if (preg_match('/Undefined index/', $errstr) > 1) {
|
if (preg_match('/Undefined index/i', $errstr) > 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user