Hello, I am using Phalcon 5.8 and PHP 8.3.
When I tried testing the debug functionality as follows:
(new \Phalcon\Support\Debug())->listenLowSeverity();
$x = $y; // $y is an undefined variable.
The following error occurred:
ArgumentCountError: Phalcon\Support\Debug::onUncaughtLowSeverity() expects exactly 5 arguments, 4 given
Upon reviewing the source code, it shows that onUncaughtLowSeverity() requires 5 arguments.
https://github.com/phalcon/cphalcon/blob/v5.8.0/phalcon/Support/Debug.zep#L265C1-L265C90
Additionally, onUncaughtLowSeverity() is set within listenLowSeverity() by set_error_handler().
https://github.com/phalcon/cphalcon/blob/v5.8.0/phalcon/Support/Debug.zep#L206C1-L210C11
However, according to the documentation for set_error_handler(),
the 5th argument "errcontext" passed to the callback function was removed in PHP 8.0.0.
https://www.php.net/manual/en/function.set-error-handler.php
In other words, there seems to be an argument mismatch between set_error_handler() and onUncaughtLowSeverity().
Could you please address this issue?
Thank you for your consideration.
Hello, I am using Phalcon 5.8 and PHP 8.3.
When I tried testing the debug functionality as follows:
The following error occurred:
Upon reviewing the source code, it shows that
onUncaughtLowSeverity()requires 5 arguments.https://github.com/phalcon/cphalcon/blob/v5.8.0/phalcon/Support/Debug.zep#L265C1-L265C90
Additionally,
onUncaughtLowSeverity()is set withinlistenLowSeverity()byset_error_handler().https://github.com/phalcon/cphalcon/blob/v5.8.0/phalcon/Support/Debug.zep#L206C1-L210C11
However, according to the documentation for
set_error_handler(),the 5th argument "errcontext" passed to the callback function was removed in PHP 8.0.0.
https://www.php.net/manual/en/function.set-error-handler.php
In other words, there seems to be an argument mismatch between
set_error_handler()andonUncaughtLowSeverity().Could you please address this issue?
Thank you for your consideration.