Use array in str_replace call.

pull/92/head
Mike Cao 11 years ago
parent c44e5369ab
commit 6b6397764d

@ -165,7 +165,7 @@ class Loader {
* @param string $class Class name
*/
public static function loadClass($class) {
$class_file = str_replace('\\', '/', str_replace('_', '/', $class)).'.php';
$class_file = str_replace(array('\\', '_'), '/', $class).'.php';
foreach (self::$dirs as $dir) {
$file = $dir.'/'.$class_file;

Loading…
Cancel
Save