catch PHP errors
This commit is contained in:
parent
7fbadf5d0c
commit
e6eb559e8b
@ -87,6 +87,13 @@ class MailConfigCheck extends AdminDetailsController
|
|||||||
|
|
||||||
protected function getCurrentMailer(): void
|
protected function getCurrentMailer(): void
|
||||||
{
|
{
|
||||||
|
set_error_handler(
|
||||||
|
function ($errno, $errstr, $errfile, $errline) {
|
||||||
|
throw oxNew(Exception::class, $errstr.' in '.$errfile.'('.$errline.')', $errno);
|
||||||
|
},
|
||||||
|
E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
|
||||||
|
);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$shop = Registry::getConfig()->getActiveShop();
|
$shop = Registry::getConfig()->getActiveShop();
|
||||||
|
|
||||||
@ -114,5 +121,7 @@ class MailConfigCheck extends AdminDetailsController
|
|||||||
ob_end_clean();
|
ob_end_clean();
|
||||||
Registry::getUtilsView()->addErrorToDisplay($e);
|
Registry::getUtilsView()->addErrorToDisplay($e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
restore_error_handler();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user