mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-02 09:32:43 +00:00
Fix for Consolce/Task/TestTask::getRealClassName(). Controller names of exactly 10 letters
being returned incorrectly Signed-off-by: mark_story <mark@mark-story.com>
This commit is contained in:
parent
757579e1d1
commit
8e93c4cd34
2 changed files with 7 additions and 1 deletions
|
@ -274,7 +274,10 @@ class TestTask extends BakeTask {
|
|||
if (strtolower($type) == 'model' || empty($this->classTypes[$type])) {
|
||||
return $class;
|
||||
}
|
||||
if (strlen($class) - strpos($class, $type) == strlen($type)) {
|
||||
|
||||
$position = strpos($class, $type);
|
||||
|
||||
if ($position !== false && strlen($class) - $position == strlen($type)) {
|
||||
return $class;
|
||||
}
|
||||
return $class . $type;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue