mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
fixes #5438, multiple binding with alias
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7632 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
4f5a51d79d
commit
931d996d90
1 changed files with 4 additions and 4 deletions
|
@ -593,7 +593,7 @@ class Model extends Overloadable {
|
|||
$className = $assoc;
|
||||
}
|
||||
|
||||
if (!isset($this->{$assoc})) {
|
||||
if (!isset($this->{$assoc}) || $this->{$assoc}->name !== $className) {
|
||||
$model = array('class' => $className, 'alias' => $assoc);
|
||||
if (PHP5) {
|
||||
$this->{$assoc} = ClassRegistry::init($model);
|
||||
|
|
Loading…
Reference in a new issue