mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
avoid notice but accept any other alert from PHP
This commit is contained in:
parent
3c78bfc89e
commit
9206dc491e
@ -1342,14 +1342,14 @@ class Client
|
|||||||
function ($errno, $errstr) {
|
function ($errno, $errstr) {
|
||||||
throw new \Exception($errstr, $errno);
|
throw new \Exception($errstr, $errno);
|
||||||
},
|
},
|
||||||
E_ERROR
|
(E_ALL ^ E_NOTICE)
|
||||||
);
|
);
|
||||||
|
|
||||||
register_shutdown_function(
|
register_shutdown_function(
|
||||||
function () {
|
function () {
|
||||||
$error = error_get_last();
|
$error = error_get_last();
|
||||||
if (null !== $error
|
if (null !== $error
|
||||||
&& $error['type'] === E_ERROR
|
&& $error['type'] === (E_ALL ^ E_NOTICE)
|
||||||
) {
|
) {
|
||||||
echo __('Failed to analyze package: %s', $error['message']);
|
echo __('Failed to analyze package: %s', $error['message']);
|
||||||
}
|
}
|
||||||
@ -1434,7 +1434,7 @@ class Client
|
|||||||
function ($errno, $errstr) {
|
function ($errno, $errstr) {
|
||||||
throw new \Exception($errstr, $errno);
|
throw new \Exception($errstr, $errno);
|
||||||
},
|
},
|
||||||
E_ERROR
|
(E_ALL ^ E_NOTICE)
|
||||||
);
|
);
|
||||||
|
|
||||||
if ($package === null) {
|
if ($package === null) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user