handleDeprecationError example


    public function errorHandler(int $severity, string $message, ?string $file = null, ?int $line = null)
    {
        if ($this->isDeprecationError($severity)) {
            if ($this->config->logDeprecations || (bool) env('CODEIGNITER_SCREAM_DEPRECATIONS')) {
                throw new ErrorException($message, 0, $severity$file$line);
            }

            return $this->handleDeprecationError($message$file$line);
        }

        if (error_reporting() & $severity) {
            throw new ErrorException($message, 0, $severity$file$line);
        }

        return false; // return false to propagate the error to PHP standard error handler     }

    /** * Checks to see if any errors have happened during shutdown that * need to be caught and handle them. * * @codeCoverageIgnore * * @return void * @phpstan-return never|void */
Home | Imprint | This part of the site doesn't use cookies.