Browse Source

Merge pull request #588 from shama/patch-controller-optimization

Controller $name set optimization
ADmad 14 years ago
parent
commit
349c1755d8
1 changed files with 1 additions and 1 deletions
  1. 1 1
      lib/Cake/Controller/Controller.php

+ 1 - 1
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) {