ZF2-566: Undefined indexes and huge args-data in Zend\Log\Formatter\ExceptionHandler::format

Issue Type: Bug Created: 2012-09-17T19:24:11.000+0000 Last Updated: 2012-10-08T20:12:24.000+0000 Status: Closed Fix version(s): Reporter: Martin_P (martin_p) Assignee: Matthew Weier O'Phinney (matthew) Tags: - Zend\Log

  • Zend\Log\Formatter\ExceptionHandler

Related issues: Attachments:


In Zend\Log\Formatter\ExceptionHandler::format the assumtion is made that the indexes file, line, class and type always exist:

<pre class="highlight">
foreach ($event<a href="">'extra']['trace'] as $trace) {
    $outputTrace .= "File  : {$trace['file']}\n"
                  . "Line  : {$trace['line']}\n"
                  . "Func  : {$trace['function']}\n"
                  . "Class : {$trace['class']}\n"
                  . "Type  : " . $this->getType($trace['type']) . "\n"
                  . "Args  : " . print_r($trace['args'], true) . "\n";


The first trace does not contain the file and line indexes

When the trace refers to a function (like call_user_func()), the indexes class and type do not exist

print_r($trace['args'], true) creates a huge, huge string of data because all classes and their descendants are completely added as a string

I honestly think the logging (of exceptions) needs a serious rewrite, because there are just so many errors in it that it is unusable in this stage (also see [ZF2-562 and ZF2-563).


Posted by Ralph Schindler (ralph) on 2012-10-08T20:12:24.000+0000

This issue has been closed on Jira and moved to GitHub for issue tracking. To continue following the resolution of this issues, please visit:

Have you found an issue?

See the Overview section for more details.


© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.