Remove deprecated argument $errcontext from default error handler

This commit is contained in:
Kijin Sung 2023-09-26 12:06:20 +09:00
parent 1de83747de
commit 5d78d114a7
2 changed files with 2 additions and 3 deletions

View file

@ -321,10 +321,9 @@ class Debug
* @param string $errstr
* @param string $errfile
* @param int $errline
* @param array $errcontext
* @return void
*/
public static function addError(int $errno, string $errstr, string $errfile, int $errline, array $errcontext = []): void
public static function addError(int $errno, string $errstr, string $errfile, int $errline): void
{
// Do not store log if disabled.
if (!self::$_enabled)

View file

@ -37,7 +37,7 @@ class DebugTest extends \Codeception\TestCase\Test
{
$file = __FILE__;
$line = __LINE__ + 1;
Rhymix\Framework\Debug::addError(~0, 'Rhymix', $file, $line, null);
Rhymix\Framework\Debug::addError(~0, 'Rhymix', $file, $line);
$errors = Rhymix\Framework\Debug::getErrors();
$this->assertGreaterThanOrEqual(1, count($errors));
$error = array_pop($errors);