Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'hotfix/zf2-454' into develop

Forward port #2403
  • Loading branch information...
commit d9bf765905befb1ba5c2e0bc3d16d2df505b8826 2 parents 5d9144f + 19844a4
@weierophinney weierophinney authored
Showing with 10 additions and 0 deletions.
  1. +10 −0 library/Zend/Log/Writer/FirePhp.php
View
10 library/Zend/Log/Writer/FirePhp.php
@@ -13,6 +13,7 @@
use FirePHP as FirePHPService;
use Zend\Log\Formatter\FirePhp as FirePhpFormatter;
use Zend\Log\Logger;
+use Zend\Log\Exception;
/**
* @category Zend
@@ -83,9 +84,17 @@ protected function doWrite(array $event)
* Gets the FirePhpInterface instance that is used for logging.
*
* @return FirePhp\FirePhpInterface
+ * @throws Exception\RuntimeException
*/
public function getFirePhp()
{
+ if (!$this->firephp instanceof FirePhp\FirePhpInterface
+ && !class_exists('FirePHP')
+ ) {
+ // No FirePHP instance, and no way to create one
+ throw new Exception\RuntimeException('FirePHP Class not found');
+ }
+
// Remember: class names in strings are absolute; thus the class_exists
// here references the canonical name for the FirePHP class
if (!$this->firephp instanceof FirePhp\FirePhpInterface
@@ -95,6 +104,7 @@ public function getFirePhp()
// names would clash in this file on this line.
$this->setFirePhp(new FirePhp\FirePhpBridge(new FirePHPService()));
}
+
return $this->firephp;
}
Please sign in to comment.
Something went wrong with that request. Please try again.