Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Controller $name set optimization #588

Merged
merged 1 commit into from

2 participants

@shama

No description provided.

@ADmad ADmad merged commit 349c175 into cakephp:2.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 28, 2012
  1. @shama
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/Cake/Controller/Controller.php
View
2  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) {
Something went wrong with that request. Please try again.