mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Merge pull request #13606 from milan-corpoflow/patch-1
Fix loading ShellHelpers from plugins
This commit is contained in:
commit
46068ac65b
1 changed files with 4 additions and 4 deletions
|
@ -806,12 +806,12 @@ class Shell extends CakeObject {
|
|||
return $this->_helpers[$name];
|
||||
}
|
||||
list($plugin, $helperClassName) = pluginSplit($name, true);
|
||||
$helperClassName = Inflector::camelize($name) . "ShellHelper";
|
||||
App::uses($helperClassName, $plugin . "Console/Helper");
|
||||
if (!class_exists($helperClassName)) {
|
||||
$helperClassNameShellHelper = Inflector::camelize($helperClassName) . "ShellHelper";
|
||||
App::uses($helperClassNameShellHelper, $plugin . "Console/Helper");
|
||||
if (!class_exists($helperClassNameShellHelper)) {
|
||||
throw new RuntimeException("Class " . $helperClassName . " not found");
|
||||
}
|
||||
$helper = new $helperClassName($this->stdout);
|
||||
$helper = new $helperClassNameShellHelper($this->stdout);
|
||||
$this->_helpers[$name] = $helper;
|
||||
return $helper;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue