ZF-11123: ZF2: Bug in Zend\Log\Writer\Syslog

Issue Type: Bug Created: 2011-03-01T05:34:11.000+0000 Last Updated: 2011-03-26T11:56:06.000+0000 Status: Resolved Fix version(s): Reporter: Sven Paulus (subsven) Assignee: Benoît Durand (intiilapa) Tags: - Zend_Log

Related issues: - ZF-10769



In Zend Framework 2 Zend\Log\Writer\Syslog contains a bug where _facility gets overwritten by the current object which leads to subsequent openlog() calls to fail.

A patch to fix this can be found on and is given below:

<pre class="highlight">
--- a/library/Zend/Log/Writer/Syslog.php
+++ b/library/Zend/Log/Writer/Syslog.php
@@ -105,7 +105,7 @@ class Syslog extends AbstractWriter

         $runInitializeSyslog = true;
         if (isset($params['facility'])) {
-            $this->_facility = $this->setFacility($params['facility']);
+            $this->setFacility($params['facility']);
             $runInitializeSyslog = false;


Posted by Benoît Durand (intiilapa) on 2011-03-26T11:56:06.000+0000

Commit e9e8913 on GitHub.

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.