ZF-12514: Zend_Log_Writer_Db looks for non-existent values
Description
Zend_Log allows to add extra information for a message. If this parameters is a string, it joins {{$event}} with key "info".
It is then written to database by Zend_Log_Writer_Db. Even if there is no extra, the writer tries to access it because it's listed in $columnMap.
Failed, it generates {{E_NOTICE}} and tries to write {{NULL}} into database. Eventually it fails with fatal error because the column does not allow {{NULL}}.
$columnMap = [
'priority' => 'priorityName',
'message' => 'message',
'info' => 'info'
];
Comments
Posted by Maksim Tsepkov (garygolden) on 2013-02-01T16:58:08.000+0000
$log = new Zend_Log(); $log->addWriter(new App_Log_Writer($db)); $log->info('message', 'extra'); $log->info('message');
Posted by Frank Brückner (frosch) on 2013-02-01T17:50:12.000+0000
Fixed on trunk (25246) and release-1.12 (25247)
Posted by Frank Brückner (frosch) on 2013-02-01T17:50:33.000+0000
@Maksim Thanks for reporting!