Skip to content
Permalink
Browse files

Changing the class name to lowercase before ordering the ClassRegistr…

…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 Jan 17, 2010
1 parent aadf62d commit a81d57a0803a02cf9df1d7ef9723540ddaee522d
Showing with 7 additions and 3 deletions.
  1. +7 −3 cake/console/libs/shell.php
@@ -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;

0 comments on commit a81d57a

Please sign in to comment.
You can’t perform that action at this time.