Skip to content

Commit

Permalink
Fix the test errors
Browse files Browse the repository at this point in the history
  • Loading branch information
laoneo committed Jan 21, 2017
1 parent 635cb69 commit c33fc91
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions libraries/loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -416,21 +416,21 @@ public static function registerNamespace($namespace, $path, $reset = false, $pre
}

// If the namespace is not yet registered or we have an explicit reset flag then set the path.
if (!isset(self::$namespaces[$namespace][$type]) || $reset)
if (!isset(self::$namespaces[$type][$namespace]) || $reset)
{
self::$namespaces[$namespace][$type] = array($path);
self::$namespaces[$type][$namespace] = array($path);
}

// Otherwise we want to simply add the path to the namespace.
else
{
if ($prepend)
{
array_unshift(self::$namespaces[$namespace][$type], $path);
array_unshift(self::$namespaces[$type][$namespace], $path);
}
else
{
self::$namespaces[$namespace][$type][] = $path;
self::$namespaces[$type][$namespace][] = $path;
}
}
}
Expand Down

0 comments on commit c33fc91

Please sign in to comment.