mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-18 18:46:17 +00:00
Fixes #3283, persistmodel throws PHP_Incomplete_Class error when using behaviors
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5772 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
03b94b2601
commit
bcefc2a14c
1 changed files with 5 additions and 1 deletions
|
@ -236,7 +236,11 @@ class Object {
|
|||
case 'registry':
|
||||
$vars = unserialize(${$name});
|
||||
foreach ($vars['0'] as $key => $value) {
|
||||
loadModel(Inflector::classify($key));
|
||||
if(strpos($key, '_behavior')) {
|
||||
loadBehavior(Inflector::classify(str_replace('_behavior', '', $key)));
|
||||
} else {
|
||||
loadModel(Inflector::classify($key));
|
||||
}
|
||||
}
|
||||
unset($vars);
|
||||
$vars = unserialize(${$name});
|
||||
|
|
Loading…
Add table
Reference in a new issue