Created
March 27, 2012 14:06
-
-
Save andriesss/2216166 to your computer and use it in GitHub Desktop.
make zend_log work with namespaces
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: library/Zend/Log.php | |
IDEA additional info: | |
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP | |
<+>UTF-8 | |
=================================================================== | |
--- library/Zend/Log.php (revision 5616) | |
+++ library/Zend/Log.php (revision ) | |
@@ -260,6 +260,7 @@ | |
$params = isset($config[ $type .'Params' ]) ? $config[ $type .'Params' ] : array(); | |
$className = $this->getClassName($config, $type, $namespace); | |
+ | |
if (!class_exists($className)) { | |
require_once 'Zend/Loader.php'; | |
Zend_Loader::loadClass($className); | |
@@ -298,8 +299,11 @@ | |
$namespace = $config[ $type . 'Namespace' ]; | |
} | |
- $fullClassName = $namespace . '_' . $className; | |
- return $fullClassName; | |
+ if (substr($namespace, -1) == '\\') { | |
+ return $namespace . $className; | |
+ } | |
+ | |
+ return $namespace . '_' . $className; | |
} | |
/** |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment