Skip to content

Commit

Permalink
Loader path
Browse files Browse the repository at this point in the history
  • Loading branch information
dgrammatiko committed Oct 17, 2014
1 parent ac3edb7 commit d8928af
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions libraries/loader.php
Expand Up @@ -280,6 +280,8 @@ public static function registerPrefix($prefix, $path, $reset = false, $prepend =
// Verify the library path exists.
if (!file_exists($path))
{
$path = (str_replace(JPATH_ROOT, '', $path) == $path) ? basename($path) : str_replace(JPATH_ROOT, '', $path);

throw new RuntimeException('Library path ' . $path . ' cannot be found.', 500);
}

Expand Down Expand Up @@ -344,6 +346,8 @@ public static function registerNamespace($namespace, $path, $reset = false, $pre
// Verify the library path exists.
if (!file_exists($path))
{
$path = (str_replace(JPATH_ROOT, '', $path) == $path) ? basename($path) : str_replace(JPATH_ROOT, '', $path);

throw new RuntimeException('Library path ' . $path . ' cannot be found.', 500);
}

Expand Down

0 comments on commit d8928af

Please sign in to comment.