We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Direction
Wrong $file, $line properties in exceptions created by "factory" methods.
$file
$line
Describe the bug
$file/$line where the exception was created.
For example, class CodeIgniter\Exceptions\FrameworkException
// file "index.php", line 10: $e = FrameworkException::forEnabledZlibOutputCompression(); var_dump($e->getFile(), $e->getLine()); // file '.../FrameworkException.php', line 26
because exception created in
CodeIgniter4/system/Exceptions/FrameworkException.php
Line 26 in 6ee89af
// file "index.php", line 10: $e = new FrameworkException(lang('Core.enabledZlibOutputCompression')); var_dump($e->getFile(), $e->getLine()); // file 'index.php', line 10
CodeIgniter 4 version 4.04
Fixes
abstract class FrameworkException extends RuntimeException implements ExceptionInterface { } class EnabledZlibOutputCompressionException extends FrameworkException { public function __construct(string $message = 'Core.enabledZlibOutputCompression', int $code = 0, Throwable $previous = null) { parent::__construct(lang($message), $code, $previous); } }
debug_backtrace()
public static function forEnabledZlibOutputCompression() { $e = new static(lang('Core.enabledZlibOutputCompression')); ['file' => $e->file, 'line' => $e->line] = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 1)[0]; return $e; }
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Direction
Wrong
$file
,$line
properties in exceptions created by "factory" methods.Describe the bug
$file
/$line
where the exception was created.For example, class CodeIgniter\Exceptions\FrameworkException
because exception created in
CodeIgniter4/system/Exceptions/FrameworkException.php
Line 26 in 6ee89af
CodeIgniter 4 version
4.04
Fixes
$file
/$line
bydebug_backtrace()
, for example:The text was updated successfully, but these errors were encountered: