CoreFiles by mySites.guru
Debug.php40 lines, 1,070 bytes, from Joomla_4.4.0-alpha4-Alpha-Full_Package.zip
Raw History Compare with 4.4.0-alpha3
md5
d9538f11113ac6b1cee9dd3ad1681dcd
sha1
f1457477efa6042778e15d064e4942429b47f90d
sha256
e5053cc247e964eecd6091eefd1c90196dfb8c3f9bc1910a6c6fdc6ab023e546
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <[email protected]>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\ErrorHandler;

/**
 * Registers all the debug tools.
 *
 * @author Fabien Potencier <[email protected]>
 */
class Debug
{
    public static function enable(): ErrorHandler
    {
        error_reporting(-1);

        if (!\in_array(\PHP_SAPI, ['cli', 'phpdbg'], true)) {
            ini_set('display_errors', 0);
        } elseif (!filter_var(\ini_get('log_errors'), \FILTER_VALIDATE_BOOLEAN) || \ini_get('error_log')) {
            // CLI - display errors only if they're not already logged to STDERR
            ini_set('display_errors', 1);
        }

        @ini_set('zend.assertions', 1);
        ini_set('assert.active', 1);
        ini_set('assert.exception', 1);

        DebugClassLoader::enable();

        return ErrorHandler::register(new ErrorHandler(new BufferingLogger(), true));
    }
}

The same content is in 34 releases, Joomla 4.4.0-alpha4 to 4.4.14. See them all, or every version of this file.