#13244 fixed memory error

This commit is contained in:
Daniel Cebrian 2024-04-02 12:51:36 +02:00
parent 02d6dbdcdb
commit ac3461fc04
1 changed files with 6 additions and 2 deletions

View File

@ -164,8 +164,12 @@ function shutdown($memory)
unset($memory->reserve);
$error = error_get_last();
if (isset($error['type']) === true && $error['type'] === 1) {
echo __('You have no memory for this operation, increase the memory limit.');
if (isset($error['type'])) {
if ($error['type'] === E_ERROR) {
if (strpos($error['message'], 'Allowed memory size') !== false) {
echo __('You have no memory for this operation, increase the memory limit.');
}
}
}
}