Skip to content

Fixing improper controller property inheritage when a controller extends... #1077

Closed
wants to merge 1 commit into from

2 participants

@burzum
CakePHP member
burzum commented Jan 20, 2013

... another controller

@markstory markstory commented on the diff Jan 21, 2013
lib/Cake/Controller/Controller.php
if ($this->name === null) {
- $this->name = substr(get_class($this), 0, -10);
+ $this->name = $name;
+ } elseif ($name !== $this->name) {
+ $this->name = $name;
}
@markstory
CakePHP member
markstory added a note Jan 21, 2013

This will break existing applications that expect the current behavior. I don't think its a good idea to just override user set values because they don't strictly follow conventions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@markstory
CakePHP member

For the reasons explained in the related lighthouse ticket I think this shouldn't change.

@markstory markstory closed this Jan 21, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.