ZF-12514: Zend_Log_Writer_Db looks for non-existent values


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'


$log = new Zend_Log(); $log->addWriter(new App_Log_Writer($db)); $log->info('message', 'extra'); $log->info('message');

Fixed on trunk (25246) and release-1.12 (25247)

@Maksim Thanks for reporting!