Skip to content

Commit

Permalink
Fix unreachable code in Model mergeVars
Browse files Browse the repository at this point in the history
Squashed commit of the following:

commit c832646
Author: Fitorec <chanerec@gmail.com>
Date:   Tue Dec 6 18:04:11 2011 -0600

    add a space after the comma in the $merge array

commit 22ad6cd
Author: Fitorec <chanerec@gmail.com>
Date:   Tue Dec 6 03:31:54 2011 -0600

    removing the condition and adding actsAs to the default list of merged keys.

commit afa4dd0
Author: Fitorec <chanerec@gmail.com>
Date:   Mon Dec 5 12:10:32 2011 -0600

    Solving the small defect in the array of behaviors(actsAs)

Signed-off-by: mark_story <mark@mark-story.com>
  • Loading branch information
fitorec authored and markstory committed Dec 18, 2011
1 parent 1358af7 commit e7c913a
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lib/Cake/Model/Model.php
Expand Up @@ -672,10 +672,7 @@ public function __construct($id = false, $table = null, $ds = null) {
}

if (is_subclass_of($this, 'AppModel')) {
$merge = array('findMethods');
if ($this->actsAs !== null || $this->actsAs !== false) {
$merge[] = 'actsAs';
}
$merge = array('actsAs', 'findMethods');
$parentClass = get_parent_class($this);
if ($parentClass !== 'AppModel') {
$this->_mergeVars($merge, $parentClass);
Expand Down

0 comments on commit e7c913a

Please sign in to comment.