diff --git a/lib/Cake/Controller/Controller.php b/lib/Cake/Controller/Controller.php index bef8bfcc9..a096296ea 100644 --- a/lib/Cake/Controller/Controller.php +++ b/lib/Cake/Controller/Controller.php @@ -316,7 +316,7 @@ class Controller extends Object implements CakeEventListener { */ public function __construct($request = null, $response = null) { if ($this->name === null) { - $this->name = substr(get_class($this), 0, strlen(get_class($this)) - 10); + $this->name = substr(get_class($this), 0, -10); } if ($this->viewPath == null) {