Skip to content

Commit

Permalink
Merge pull request joomla#460 from nonumber/staging
Browse files Browse the repository at this point in the history
Fixed issue with JFormHelper:loadClass() including only first filename match
  • Loading branch information
LouisLandry committed Nov 4, 2011
2 parents 2760aac + 302dbe1 commit 7a35705
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions libraries/joomla/form/helper.php
Expand Up @@ -199,9 +199,17 @@ protected static function loadClass($entity, $type)
}

// Try to find the class file.
if ($file = JPath::find($paths, strtolower($type) . '.php'))
$type = strtolower($type) . '.php';
foreach ($paths as $path)
{
include_once $file;
if ($file = JPath::find($path, $type))
{
require_once $file;
if (class_exists($class))
{
break;
}
}
}

// Check for all if the class exists.
Expand Down

0 comments on commit 7a35705

Please sign in to comment.