Permalink
Browse files

Controller $name set optimization

  • Loading branch information...
shama committed Mar 28, 2012
1 parent 0443fe1 commit 33ab634abaa8f59b112345d0102a66f0805e70e9
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 33ab634

Please sign in to comment.