ZF-5778: Filtering messages which are not strings

Issue Type: Bug Created: 2009-02-13T08:02:19.000+0000 Last Updated: 2012-11-20T20:53:29.000+0000 Status: Closed Fix version(s): Reporter: Aspra Flavius Adrian (flavious) Assignee: None Tags: - Zend_Log

Related issues: Attachments:



Some log writers like the firebug one are capable of logging arrays, but Zend_Log_Filter_Message only accepts strings (by passing $event['message'] to preg_match() directly).

Proposed modification:

public function accept($event) { $message = $event['message']; if(is_array($event['message'])) { $message = var_export($message,TRUE); }

return preg_match($this->_regexp, $message) > 0;


Such that it won't throw the warning "preg_match() expects parameter 2 to be string, array given in /usr/share/httpd/ZendFramework-1.7.4/library/Zend/Log/Filter/Message.php"


Posted by Rob Allen (rob) on 2012-11-20T20:53:29.000+0000

Bulk change of all issues last updated before 1st January 2010 as "Won't Fix".

Feel free to re-open and provide a patch if you want to fix this issue.

Have you found an issue?

See the Overview section for more details.


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

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