Error
[TypeError] preg_replace(): Argument #2 ($replacement) must be of type array|string, int given (/home/web7777/idrhome.net/public_html/vendor/cakephp/cakephp/src/Utility/Text.php:235)
#0 /home/web7777/idrhome.net/public_html/vendor/cakephp/cakephp/src/Utility/Text.php(235): preg_replace('/(?<!\\\\)\\{\\:typ...', 2363381545, '{:reference} - ...')
#1 /home/web7777/idrhome.net/public_html/vendor/cakephp/cakephp/src/Error/Debugger.php(359): Cake\Utility\Text::insert('{:reference} - ...', Array, Array)
#2 /home/web7777/idrhome.net/public_html/vendor/cakephp/cakephp/src/Error/Debugger.php(276): Cake\Error\Debugger::formatTrace(Array, Array)
#3 /home/web7777/idrhome.net/public_html/vendor/cakephp/cakephp/src/Error/Debugger.php(777): Cake\Error\Debugger::trace(Array)
#4 /home/web7777/idrhome.net/public_html/vendor/cakephp/cakephp/src/Error/ErrorHandler.php(121): Cake\Error\Debugger->outputError(Array)
#5 /home/web7777/idrhome.net/public_html/vendor/cakephp/cakephp/src/Error/BaseErrorHandler.php(187): Cake\Error\ErrorHandler->_displayError(Array, true)
#6 /home/web7777/idrhome.net/public_html/vendor/cakephp/cakephp/src/Http/ServerRequestFactory.php(163): Cake\Error\BaseErrorHandler->handleError(8192, 'Creation of dyn...', '/home/web7777/i...', 163)
#7 /home/web7777/idrhome.net/public_html/vendor/cakephp/cakephp/src/Http/ServerRequestFactory.php(129): Cake\Http\ServerRequestFactory::marshalUriFromSapi(Array, Array)
#8 /home/web7777/idrhome.net/public_html/vendor/cakephp/cakephp/src/Http/ServerRequestFactory.php(63): Cake\Http\ServerRequestFactory::createUri(Array)
#9 /home/web7777/idrhome.net/public_html/vendor/cakephp/cakephp/src/Error/ExceptionRenderer.php(125): Cake\Http\ServerRequestFactory::fromGlobals()
#10 /home/web7777/idrhome.net/public_html/vendor/cakephp/cakephp/src/Error/ExceptionRenderer.php(106): Cake\Error\ExceptionRenderer->_getController()
#11 /home/web7777/idrhome.net/public_html/vendor/cakephp/cakephp/src/Error/ErrorHandler.php(169): Cake\Error\ExceptionRenderer->__construct(Object(TypeError), NULL)
#12 /home/web7777/idrhome.net/public_html/vendor/cakephp/cakephp/src/Error/ErrorHandler.php(134): Cake\Error\ErrorHandler->getRenderer(Object(TypeError), NULL)
#13 /home/web7777/idrhome.net/public_html/vendor/cakephp/cakephp/src/Error/BaseErrorHandler.php(221): Cake\Error\ErrorHandler->_displayException(Object(TypeError))
#14 [internal function]: Cake\Error\BaseErrorHandler->handleException(Object(TypeError))
#15 {main}
File
/home/web7777/idrhome.net/public_html/vendor/cakephp/cakephp/src/Error/ErrorHandler.php
Line
196
|
$exception->getFile(), |
|
$exception->getLine(), |
|
$exception->getTraceAsString() |
|
); |
|
trigger_error($message, E_USER_ERROR); |
|
} |
|
|
|
/** |
|
* Method that can be easily stubbed in testing. |
|
$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, |
(int) 256
'[TypeError] preg_replace(): Argument #2 ($replacement) must be of type array|string, int given (/home/web7777/idrhome.net/public_html/vendor/cakephp/cakephp/src/Utility/Text.php:235)
#0 /home/web7777/idrhome.net/public_html/vendor/cakephp/cakephp/src/Utility/Text.php(235): preg_replace('/(?<!\\\\)\\{\\:typ...', 2363381545, '{:reference} - ...')
#1 /home/web7777/idrhome.net/public_html/vendor/cakephp/cakephp/src/Error/Debugger.php(359): Cake\Utility\Text::insert('{:reference} - ...', Array, Array)
#2 /home/web7777/idrhome.net/public_html/vendor/cakephp/cakephp/src/Error/Debugger.php(276): Cake\Error\Debugger::formatTrace(Array, Array)
#3 /home/web7777/idrhome.net/public_html/vendor/cakephp/cakephp/src/Error/Debugger.php(777): Cake\Error\Debugger::trace(Array)
#4 /home/web7777/idrhome.net/public_html/vendor/cakephp/cakephp/src/Error/ErrorHandler.php(121): Cake\Error\Debugger->outputError(Array)
#5 /home/web7777/idrhome.net/public_html/vendor/cakephp/cakephp/src/Error/BaseErrorHandler.php(187): Cake\Error\ErrorHandler->_displayError(Array, true)
#6 /home/web7777/idrhome.net/public_html/vendor/cakephp/cakephp/src/Http/ServerRequestFactory.php(163): Cake\Error\BaseErrorHandler->handleError(8192, 'Creation of dyn...', '/home/web7777/i...', 163)
#7 /home/web7777/idrhome.net/public_html/vendor/cakephp/cakephp/src/Http/ServerRequestFactory.php(129): Cake\Http\ServerRequestFactory::marshalUriFromSapi(Array, Array)
#8 /home/web7777/idrhome.net/public_html/vendor/cakephp/cakephp/src/Http/ServerRequestFactory.php(63): Cake\Http\ServerRequestFactory::createUri(Array)
#9 /home/web7777/idrhome.net/public_html/vendor/cakephp/cakephp/src/Error/ExceptionRenderer.php(125): Cake\Http\ServerRequestFactory::fromGlobals()
#10 /home/web7777/idrhome.net/public_html/vendor/cakephp/cakephp/src/Error/ExceptionRenderer.php(106): Cake\Error\ExceptionRenderer->_getController()
#11 /home/web7777/idrhome.net/public_html/vendor/cakephp/cakephp/src/Error/ErrorHandler.php(169): Cake\Error\ExceptionRenderer->__construct(Object(TypeError), NULL)
#12 /home/web7777/idrhome.net/public_html/vendor/cakephp/cakephp/src/Error/ErrorHandler.php(134): Cake\Error\ErrorHandler->getRenderer(Object(TypeError), NULL)
#13 /home/web7777/idrhome.net/public_html/vendor/cakephp/cakephp/src/Error/BaseErrorHandler.php(221): Cake\Error\ErrorHandler->_displayException(Object(TypeError))
#14 [internal function]: Cake\Error\BaseErrorHandler->handleException(Object(TypeError))
#15 {main}'
'/home/web7777/idrhome.net/public_html/vendor/cakephp/cakephp/src/Error/ErrorHandler.php'
(int) 196
|
$exception->getFile(), |
|
$exception->getLine(), |
|
$exception->getTraceAsString() |
|
); |
|
trigger_error($message, E_USER_ERROR); |
|
} |
|
|
|
/** |
|
* Method that can be easily stubbed in testing. |
'[TypeError] preg_replace(): Argument #2 ($replacement) must be of type array|string, int given (/home/web7777/idrhome.net/public_html/vendor/cakephp/cakephp/src/Utility/Text.php:235)
#0 /home/web7777/idrhome.net/public_html/vendor/cakephp/cakephp/src/Utility/Text.php(235): preg_replace('/(?<!\\\\)\\{\\:typ...', 2363381545, '{:reference} - ...')
#1 /home/web7777/idrhome.net/public_html/vendor/cakephp/cakephp/src/Error/Debugger.php(359): Cake\Utility\Text::insert('{:reference} - ...', Array, Array)
#2 /home/web7777/idrhome.net/public_html/vendor/cakephp/cakephp/src/Error/Debugger.php(276): Cake\Error\Debugger::formatTrace(Array, Array)
#3 /home/web7777/idrhome.net/public_html/vendor/cakephp/cakephp/src/Error/Debugger.php(777): Cake\Error\Debugger::trace(Array)
#4 /home/web7777/idrhome.net/public_html/vendor/cakephp/cakephp/src/Error/ErrorHandler.php(121): Cake\Error\Debugger->outputError(Array)
#5 /home/web7777/idrhome.net/public_html/vendor/cakephp/cakephp/src/Error/BaseErrorHandler.php(187): Cake\Error\ErrorHandler->_displayError(Array, true)
#6 /home/web7777/idrhome.net/public_html/vendor/cakephp/cakephp/src/Http/ServerRequestFactory.php(163): Cake\Error\BaseErrorHandler->handleError(8192, 'Creation of dyn...', '/home/web7777/i...', 163)
#7 /home/web7777/idrhome.net/public_html/vendor/cakephp/cakephp/src/Http/ServerRequestFactory.php(129): Cake\Http\ServerRequestFactory::marshalUriFromSapi(Array, Array)
#8 /home/web7777/idrhome.net/public_html/vendor/cakephp/cakephp/src/Http/ServerRequestFactory.php(63): Cake\Http\ServerRequestFactory::createUri(Array)
#9 /home/web7777/idrhome.net/public_html/vendor/cakephp/cakephp/src/Error/ExceptionRenderer.php(125): Cake\Http\ServerRequestFactory::fromGlobals()
#10 /home/web7777/idrhome.net/public_html/vendor/cakephp/cakephp/src/Error/ExceptionRenderer.php(106): Cake\Error\ExceptionRenderer->_getController()
#11 /home/web7777/idrhome.net/public_html/vendor/cakephp/cakephp/src/Error/ErrorHandler.php(169): Cake\Error\ExceptionRenderer->__construct(Object(TypeError), NULL)
#12 /home/web7777/idrhome.net/public_html/vendor/cakephp/cakephp/src/Error/ErrorHandler.php(134): Cake\Error\ErrorHandler->getRenderer(Object(TypeError), NULL)
#13 /home/web7777/idrhome.net/public_html/vendor/cakephp/cakephp/src/Error/BaseErrorHandler.php(221): Cake\Error\ErrorHandler->_displayException(Object(TypeError))
#14 [internal function]: Cake\Error\BaseErrorHandler->handleException(Object(TypeError))
#15 {main}'
(int) 256
|
); |
|
$response = $renderer->render(); |
|
$this->_sendResponse($response); |
|
} catch (Throwable $exception) { |
|
$this->_logInternalError($exception); |
|
} |
|
} |
|
|
|
/** |
object(TypeError) {
[protected] message => 'preg_replace(): Argument #2 ($replacement) must be of type array|string, int given'
[protected] code => (int) 0
[protected] file => '/home/web7777/idrhome.net/public_html/vendor/cakephp/cakephp/src/Utility/Text.php'
[protected] line => (int) 235
}
|
* @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); |
|
} |
object(TypeError) {
[protected] message => 'preg_replace(): Argument #2 ($replacement) must be of type array|string, int given'
[protected] code => (int) 0
[protected] file => '/home/web7777/idrhome.net/public_html/vendor/cakephp/cakephp/src/Utility/Text.php'
[protected] line => (int) 235
}
object(TypeError) {
[protected] message => 'preg_replace(): Argument #2 ($replacement) must be of type array|string, int given'
[protected] code => (int) 0
[protected] file => '/home/web7777/idrhome.net/public_html/vendor/cakephp/cakephp/src/Utility/Text.php'
[protected] line => (int) 235
}
If you want to customize this error message, create
templates/Error/fatal_error.php