+ // Use the custom fatalErrorHandler if defined
+ if (in_array($priority, [PEAR_LOG_EMERG, PEAR_LOG_ALERT, PEAR_LOG_CRIT, PEAR_LOG_ERR])) {
+ if ($config->fatalErrorHandler && function_exists($config->fatalErrorHandler)) {
+ $name = $config->fatalErrorHandler;
+ $vars = [
+ 'debugLogMessage' => $message,
+ 'priority' => $priority,
+ ];
+ $name($vars);
+ }
+ }
+