Skip to content
New issue

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

If an internal PHP function, such as call_user_func, in the backtrace, the 'file' and 'line' not be available. #528

Merged
merged 8 commits into from
Dec 4, 2023

Conversation

zymeli
Copy link
Contributor

@zymeli zymeli commented Nov 12, 2023

Q A
Is bugfix? ✔️

It should be noted that if an internal php function such as call_user_func in the backtrace, the 'file' and 'line' entries will not be set.
@see https://www.php.net/manual/en/function.debug-backtrace.php#59713

…ce, the 'file' and 'line' not be available.

such as `call_user_func`:
...
D:\yii2\common\yiime\DbActiveQuery.php:34
D:\yii2\backend\controllers\SiteController.php:83
[ 'function' => 'actionLogin' 'class' => 'backend\\controllers\\SiteController' 'type' => '->' ]
D:\yii2\vendor\yiisoft\yii2\base\InlineAction.php:57
D:\yii2\vendor\yiisoft\yii2\base\Controller.php:178
...

such as `ReflectionClass::newInstanceArgs`:
...
D:\yii2\vendor\yiisoft\yii2-debug\src\panels\UserPanel.php:83
D:\yii2\vendor\yiisoft\yii2\base\BaseObject.php:109
[ 'function' => '__construct' 'class' => 'yii\\base\\BaseObject' 'type' => '->' ]
D:\yii2\vendor\yiisoft\yii2\di\Container.php:419
D:\yii2\vendor\yiisoft\yii2\di\Container.php:170
...
Copy link

what-the-diff bot commented Nov 12, 2023

PR Summary

  • Updated Linking Mechanism
    The first change takes place in the index.php file under src/views/default. Instead of using a statically defined link, we are now using the Url::to(['index']) command. This allows for more flexibility and ensures that the link always directs to the right place, even if the targeted page's location changes in the future.

  • Enhanced Error Reporting
    In the detail.php file under src/views/default/panels/log, a new condition is added to improve information output when an issue arises. If specific details about the problem ('trace' information) are available, these will be neatly formatted and displayed. If such specifics are not available, the system will then provide a general analysis of the issue. This makes diagnosing and resolving issues easier, and provides those reviewing the issues with a better understanding of what's going wrong.

@zymeli zymeli marked this pull request as ready for review November 12, 2023 12:33
@samdark
Copy link
Member

samdark commented Nov 23, 2023

Would you please add a line for CHANGELOG?

@samdark samdark requested a review from a team November 23, 2023 13:35
CHANGELOG.md Outdated Show resolved Hide resolved
Co-authored-by: Bizley <pawel.bizley@gmail.com>
@bizley bizley added the type:bug Bug label Nov 27, 2023
@bizley bizley added this to the 2.1.25 milestone Nov 27, 2023
@samdark samdark merged commit 0838a2b into yiisoft:master Dec 4, 2023
10 checks passed
@samdark
Copy link
Member

samdark commented Dec 4, 2023

Thank you!

@samdark samdark modified the milestones: 2.1.25, 2.1.26 Dec 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants