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

Debugger::errorHandler() argument $context can be null #379

janbarasek opened this issue Aug 19, 2019 · 0 comments

Debugger::errorHandler() argument $context can be null #379

janbarasek opened this issue Aug 19, 2019 · 0 comments


Copy link

@janbarasek janbarasek commented Aug 19, 2019

Version: 2.6.4

Bug Description

In case of imap_* function error, for example: Unknown: UID sequence range invalid (errflg=2) Tracy can not log it.

I noticed that definition of Debugger::errorHandler, parameter $context must be array, but in this specific case are given arguments in special case.

I tried dump it:

 * Handler to catch warnings and notices.
 * @return bool|null   false to call normal error handler, null otherwise
 * @throws ErrorException
 * @internal
public static function errorHandler(int $severity, string $message, string $file, int $line, $context = []): ?bool
	if (\is_array($context) === false) {
		echo Dumper::toHtml($context);
		echo Dumper::toHtml([
			'severity' => $severity,
			'message' => $message,
			'file' => $file,
			'line' => $line,
			'content' => $context,

so in this case parameter $context is null and file and line is unknown.

Snímek obrazovky 2019-08-19 v 11 15 39

I caused an error while trying to run old codes from this page:

Steps To Reproduce

Simply call function imap_fetch_overview with invalid $sequence (second parameter).

For instance:

$imap = imap_open($root, $login, $password, OP_HALFOPEN);
imap_fetch_overview($imap, '1:0', FT_UID)

In variable $imap is valid imap resource created by imap_open().


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

No branches or pull requests

1 participant