mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +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
|
* @throws RuntimeException If invalid class name is provided
|
||||||
*/
|
*/
|
||||||
public function helper($name) {
|
public function helper($name) {
|
||||||
list($plugin, $helperClassName) = pluginSplit($name, true);
|
|
||||||
$helperClassName = Inflector::camelize($name) . "ShellHelper";
|
|
||||||
if (isset($this->_helpers[$name])) {
|
if (isset($this->_helpers[$name])) {
|
||||||
return $this->_helpers[$name];
|
return $this->_helpers[$name];
|
||||||
}
|
}
|
||||||
|
list($plugin, $helperClassName) = pluginSplit($name, true);
|
||||||
|
$helperClassName = Inflector::camelize($name) . "ShellHelper";
|
||||||
App::uses($helperClassName, $plugin . "Console/Helper");
|
App::uses($helperClassName, $plugin . "Console/Helper");
|
||||||
if (!class_exists($helperClassName)) {
|
if (!class_exists($helperClassName)) {
|
||||||
throw new RuntimeException("Class " . $helperClassName . " not found");
|
throw new RuntimeException("Class " . $helperClassName . " not found");
|
||||||
|
|
Loading…
Add table
Reference in a new issue