Skip to content

Commit

Permalink
Changing the class name to lowercase before ordering the ClassRegistr…
Browse files Browse the repository at this point in the history
…y in PHP 4 to not have problems of duplication of tasks in the shell. Fixes #186.
  • Loading branch information
jrbasso authored and jperras committed Feb 1, 2010
1 parent aadf62d commit a81d57a
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions cake/console/libs/shell.php
Expand Up @@ -293,12 +293,16 @@ function loadTasks() {
}
}
}
if (ClassRegistry::isKeySet($taskClass)) {
$taskClassCheck = $taskClass;
if (!PHP5) {
$taskClassCheck = strtolower($taskClass);
}
if (ClassRegistry::isKeySet($taskClassCheck)) {
$this->taskNames[] = $taskName;
if (!PHP5) {
$this->{$taskName} =& ClassRegistry::getObject($taskClass);
$this->{$taskName} =& ClassRegistry::getObject($taskClassCheck);
} else {
$this->{$taskName} = ClassRegistry::getObject($taskClass);
$this->{$taskName} = ClassRegistry::getObject($taskClassCheck);
}
} else {
$this->taskNames[] = $taskName;
Expand Down

0 comments on commit a81d57a

Please sign in to comment.