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

Fix error during handling of closure errors #13817

Closed

Conversation

mikehaertl
Copy link
Contributor

@mikehaertl mikehaertl commented Mar 21, 2017

Q A
Is bugfix? yes
New feature? no
Breaks BC? no
Tests pass? -
Fixed issues #13689

If an error occurs inside a closure method, the error handler will fail. For example:

        $x = array_map(function ($r) {
            return $r->doesnotexist;
        }, [1, 2, 3]);

Will lead to:

An Error occurred while handling another error:
ReflectionException: Method app\controllers\ClientController::app\controllers{closure}() does not exist in /var/www/vendor/yiisoft/yii2/web/ErrorHandler.php:199

The fix is easy, but I was not sure how to properly test this.

@samdark samdark self-assigned this Mar 21, 2017
@samdark samdark added this to the 2.0.12 milestone Mar 21, 2017
@samdark samdark added type:bug Bug pr:request for unit tests Unit tests are needed. labels Mar 21, 2017
@samdark samdark closed this Apr 26, 2017
@samdark
Copy link
Member

samdark commented Apr 26, 2017

Fixed in 6792099

@mikehaertl mikehaertl deleted the fix-error-handler-closure branch August 8, 2020 06:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr:request for unit tests Unit tests are needed. type:bug Bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants