mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-03-18 15:39:53 +00:00
Fixing issues in ContainableBehavior that could leave models unbound when 'fields' was used as part of containment conditions. Fixes #253
This commit is contained in:
parent
dd0c4a64c5
commit
6db91b0f49
2 changed files with 2 additions and 2 deletions
|
@ -155,7 +155,7 @@ class ContainableBehavior extends ModelBehavior {
|
|||
if (!$reset && empty($instance->__backOriginalAssociation)) {
|
||||
$instance->__backOriginalAssociation = $backupBindings;
|
||||
} else if ($reset) {
|
||||
$instance->__backAssociation[$type] = $instance->{$type};
|
||||
$instance->__backAssociation[$type] = $backupBindings[$type];
|
||||
}
|
||||
$instance->{$type}[$assoc] = array_merge($instance->{$type}[$assoc], $model['keep'][$assoc]);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue