mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-18 18:46:17 +00:00
Re-order code in Shell::helper() to return slightly earlier
This commit is contained in:
parent
75cabfe78b
commit
e640420dd9
1 changed files with 2 additions and 2 deletions
|
@ -793,11 +793,11 @@ class Shell extends Object {
|
|||
* @throws RuntimeException If invalid class name is provided
|
||||
*/
|
||||
public function helper($name) {
|
||||
list($plugin, $helperClassName) = pluginSplit($name, true);
|
||||
$helperClassName = Inflector::camelize($name) . "ShellHelper";
|
||||
if (isset($this->_helpers[$name])) {
|
||||
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)) {
|
||||
throw new RuntimeException("Class " . $helperClassName . " not found");
|
||||
|
|
Loading…
Add table
Reference in a new issue