|
$exception->getFile(), |
|
$exception->getLine(), |
|
$exception->getTraceAsString() |
|
); |
|
trigger_error($message, E_USER_ERROR); |
|
} |
|
|
|
/** |
|
* Method that can be easily stubbed in testing. |
Arguments
|
$this->_handled = true; |
|
[$error, $log] = static::mapErrorCode($code); |
|
if ($log === LOG_ERR) { |
|
/** @psalm-suppress PossiblyNullArgument */ |
|
return $this->handleFatalError($code, $description, $file, $line); |
|
} |
|
$data = [ |
|
'level' => $log, |
|
'code' => $code, |
Arguments
'[TypeError] str_replace(): Argument #2 ($replace) must be of type array|string, int given (/home1/pertutti/public_html/vendor/cakephp/cakephp/src/Utility/Text.php:240)
#0 /home1/pertutti/public_html/vendor/cakephp/cakephp/src/Utility/Text.php(240): str_replace('6438c669e0d0de9...', 71, 'b8af13ea9c8fe89...')
#1 /home1/pertutti/public_html/vendor/cakephp/cakephp/src/Error/Debugger.php(455): Cake\Utility\Text::insert('b8af13ea9c8fe89...', Array, Array)
#2 /home1/pertutti/public_html/vendor/cakephp/cakephp/src/Error/Debugger.php(372): Cake\Error\Debugger::formatTrace(Array, Array)
#3 /home1/pertutti/public_html/vendor/cakephp/cakephp/src/Error/Debugger.php(902): Cake\Error\Debugger::trace(Array)
#4 /home1/pertutti/public_html/vendor/cakephp/cakephp/src/Error/ErrorHandler.php(121): Cake\Error\Debugger->outputError(Array)
#5 /home1/pertutti/public_html/vendor/cakephp/cakephp/src/Error/BaseErrorHandler.php(187): Cake\Error\ErrorHandler->_displayError(Array, true)
#6 [internal function]: Cake\Error\BaseErrorHandler->handleError(512, 'Unable to emit ...', '/home1/pertutti...', 71)
#7 /home1/pertutti/public_html/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php(71): trigger_error('Unable to emit ...', 512)
#8 /home1/pertutti/public_html/vendor/cakephp/cakephp/src/Error/ErrorHandler.php(214): Cake\Http\ResponseEmitter->emit(Object(Cake\Http\Response))
#9 /home1/pertutti/public_html/vendor/cakephp/cakephp/src/Error/ErrorHandler.php(139): Cake\Error\ErrorHandler->_sendResponse(Object(Cake\Http\Response))
#10 /home1/pertutti/public_html/vendor/cakephp/cakephp/src/Error/BaseErrorHandler.php(221): Cake\Error\ErrorHandler->_displayException(Object(TypeError))
#11 [internal function]: Cake\Error\BaseErrorHandler->handleException(Object(TypeError))
#12 {main}'
'/home1/pertutti/public_html/vendor/cakephp/cakephp/src/Error/ErrorHandler.php'
|
$exception->getFile(), |
|
$exception->getLine(), |
|
$exception->getTraceAsString() |
|
); |
|
trigger_error($message, E_USER_ERROR); |
|
} |
|
|
|
/** |
|
* Method that can be easily stubbed in testing. |
Arguments
'[TypeError] str_replace(): Argument #2 ($replace) must be of type array|string, int given (/home1/pertutti/public_html/vendor/cakephp/cakephp/src/Utility/Text.php:240)
#0 /home1/pertutti/public_html/vendor/cakephp/cakephp/src/Utility/Text.php(240): str_replace('6438c669e0d0de9...', 71, 'b8af13ea9c8fe89...')
#1 /home1/pertutti/public_html/vendor/cakephp/cakephp/src/Error/Debugger.php(455): Cake\Utility\Text::insert('b8af13ea9c8fe89...', Array, Array)
#2 /home1/pertutti/public_html/vendor/cakephp/cakephp/src/Error/Debugger.php(372): Cake\Error\Debugger::formatTrace(Array, Array)
#3 /home1/pertutti/public_html/vendor/cakephp/cakephp/src/Error/Debugger.php(902): Cake\Error\Debugger::trace(Array)
#4 /home1/pertutti/public_html/vendor/cakephp/cakephp/src/Error/ErrorHandler.php(121): Cake\Error\Debugger->outputError(Array)
#5 /home1/pertutti/public_html/vendor/cakephp/cakephp/src/Error/BaseErrorHandler.php(187): Cake\Error\ErrorHandler->_displayError(Array, true)
#6 [internal function]: Cake\Error\BaseErrorHandler->handleError(512, 'Unable to emit ...', '/home1/pertutti...', 71)
#7 /home1/pertutti/public_html/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php(71): trigger_error('Unable to emit ...', 512)
#8 /home1/pertutti/public_html/vendor/cakephp/cakephp/src/Error/ErrorHandler.php(214): Cake\Http\ResponseEmitter->emit(Object(Cake\Http\Response))
#9 /home1/pertutti/public_html/vendor/cakephp/cakephp/src/Error/ErrorHandler.php(139): Cake\Error\ErrorHandler->_sendResponse(Object(Cake\Http\Response))
#10 /home1/pertutti/public_html/vendor/cakephp/cakephp/src/Error/BaseErrorHandler.php(221): Cake\Error\ErrorHandler->_displayException(Object(TypeError))
#11 [internal function]: Cake\Error\BaseErrorHandler->handleException(Object(TypeError))
#12 {main}'
|
); |
|
$response = $renderer->render(); |
|
$this->_sendResponse($response); |
|
} catch (Throwable $exception) { |
|
$this->_logInternalError($exception); |
|
} |
|
} |
|
|
|
/** |
Arguments
object(TypeError) id:0 {
protected message => 'str_replace(): Argument #2 ($replace) must be of type array|string, int given'
protected code => (int) 0
protected file => '/home1/pertutti/public_html/vendor/cakephp/cakephp/src/Utility/Text.php'
protected line => (int) 240
}
|
* @see https://secure.php.net/manual/en/function.set-exception-handler.php |
|
*/ |
|
public function handleException(Throwable $exception): void |
|
{ |
|
$this->_displayException($exception); |
|
$this->logException($exception); |
|
$code = $exception->getCode() ?: 1; |
|
$this->_stop((int)$code); |
|
} |
Arguments
object(TypeError) id:0 {
protected message => 'str_replace(): Argument #2 ($replace) must be of type array|string, int given'
protected code => (int) 0
protected file => '/home1/pertutti/public_html/vendor/cakephp/cakephp/src/Utility/Text.php'
protected line => (int) 240
}
Arguments
object(TypeError) id:0 {
protected message => 'str_replace(): Argument #2 ($replace) must be of type array|string, int given'
protected code => (int) 0
protected file => '/home1/pertutti/public_html/vendor/cakephp/cakephp/src/Utility/Text.php'
protected line => (int) 240
}
If you want to customize this error message, create
templates/Error/error500.php