Permalink
Browse files

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

Controller $name set optimization
  • Loading branch information...
2 parents 0443fe1 + 33ab634 commit 349c1755d8334c0b3de66e9db1d6cab5d74154b0 @ADmad ADmad committed Mar 28, 2012
Showing with 1 addition and 1 deletion.
  1. +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) {

0 comments on commit 349c175

Please sign in to comment.