ZF-10698: monitor_custom_event() signature wrong in ZendMonitor.php
Description
I'm getting this warning when using ZendMonitor
Warning: monitor_custom_event() expects at most 3 parameters, 4 given in /usr/local/zend/share/ZendFramework/library/Zend/Log/Writer/ZendMonitor.php on line 106
taking a look at the ZendMonitor.php code, the call looks like this:
protected function _write($event)
{
$priority = $event['priority'];
$message = $event['message'];
unset($event['priority'], $event['message']);
if (!empty($event)) {
monitor_custom_event($priority, $message, false, $event);
} else {
monitor_custom_event($priority, $message);
}
}
the actual signature of the method as documented in http://files.zend.com/help/Zend-Server/…
void zend_monitor_custom_event (string $class, string $text, mixed $user_data)
Comments
Posted by Matthew Weier O'Phinney (matthew) on 2010-11-17T07:32:21.000+0000
This issue was fixed yesterday in trunk and the 1.11 release branch.
Posted by Ramon Henrique Ornelas (ramon) on 2010-11-17T07:57:38.000+0000
Hi @matthew
I think that could be added in the clause else (line 127 Zend/Log/Writer/ZendMonitor.php) too a verification if is Zend Server to call the function zend_monitor_custom_event.
Greetings Ramon
Posted by Matthew Weier O'Phinney (matthew) on 2010-11-17T09:05:59.000+0000
We could, but it's not strictly necessary, as the first two arguments of each is the same, and monitor_custom_event() is aliased to zend_monitor_custom_event() in Zend Server.