Remove duplicates from loader directories.

pull/55/merge
Mike Cao 12 years ago
parent 93d7602b20
commit 1acb68756c

@ -192,11 +192,11 @@ class Loader {
public static function addDirectory($dir) {
if (is_array($dir) || is_object($dir)) {
foreach ($dir as $value) {
self::$dirs[] = $value;
self::addDirectory($value);
}
}
else if (is_string($dir)) {
self::$dirs[] = $dir;
if (!in_array($dir, self::$dirs)) self::$dirs[] = $dir;
}
}
}

Loading…
Cancel
Save