Skip to content

Commit

Permalink
fix bug in fileToName method
Browse files Browse the repository at this point in the history
  • Loading branch information
nadar authored and boehsermoe committed Jul 14, 2019
1 parent 857bde8 commit d49dd9e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/helpers/ObjectHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ public static function getControllers(Module $module)
}
} catch (InvalidParamException $e) {
try {
$staticPath = static::staticBasePath() . DIRECTORY_SEPARATOR . 'controllers';
$staticPath = $module::staticBasePath() . DIRECTORY_SEPARATOR . 'controllers';
foreach (FileHelper::findFiles($staticPath) as $file) {
$files[self::fileToName($staticPath, $file)] = $file;
}
Expand All @@ -234,6 +234,6 @@ public static function getControllers(Module $module)
*/
private static function fileToName($prefix, $file)
{
Inflector::camel2id(ltrim(str_replace([$prefix, 'Controller.php'], '', $file), DIRECTORY_SEPARATOR));
return Inflector::camel2id(ltrim(str_replace([$prefix, 'Controller.php'], '', $file), DIRECTORY_SEPARATOR));
}
}

0 comments on commit d49dd9e

Please sign in to comment.