-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Debug] TypeError in ErrorHandler #20068
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
Comments
/cc @nicolas-grekas |
I guess this should be reported on the imap extension also, because having |
If the imap extension does not behave correctly, we can indeed close this one as won't fix. |
@gharlan please open a bug report on bugs.php.net, here is a plain php reproducer: <?php
set_error_handler(function ($type, $message, $file, $line, $context) {
if ($context) {
$context = array_keys($context);
}
var_dump(compact('type', 'message', 'file', 'line', 'context'));
});
@imap_open('foo', 'bar', 'baz'); which displays:
which looks wrong |
Problem still exists. |
See #21401 |
has the issue been reported to PHP ? |
This PR was merged into the 2.7 branch. Discussion ---------- [Debug] Workaround "null" $context | Q | A | ------------- | --- | Branch? | 2.7 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - As reported in #20068, the imap extension can call error handlers with $context = null. Commits ------- 2555f31 [Debug] Workaround "null" $context
In a command class I'm using something like this:
When an imap error occurs, I get an uncaught TypeError:
Symfony: current master
PHP: 7.0.11
It is reproducibly with symfony demo by adding the code above to
ListUsersCommand::execute
:The text was updated successfully, but these errors were encountered: