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:
phpnut 2007-10-17 01:56:14 +00:00
parent 03b94b2601
commit bcefc2a14c

View file

@ -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});