1
0
mirror of synced 2024-12-14 07:06:04 +03:00

Fixed getLoadedModels()

This commit is contained in:
wernerm 2007-11-23 00:28:58 +00:00
parent 54050f8c81
commit 24a8cef0e6

View File

@ -555,9 +555,9 @@ final class Doctrine
// file is not the same as the actual model file name itself // file is not the same as the actual model file name itself
if (isset(self::$_loadedModels[$name])) { if (isset(self::$_loadedModels[$name])) {
try { try {
$tmp = self::$_loadedModels[$name];
require_once self::$_loadedModels[$name]; require_once self::$_loadedModels[$name];
$declaredAfter = get_declared_classes(); $declaredAfter = get_declared_classes();
// Using array_slice since array_diff is broken is some versions
$foundClasses = array_slice($declaredAfter, count($declaredBefore)-1); $foundClasses = array_slice($declaredAfter, count($declaredBefore)-1);
if ($foundClasses) { if ($foundClasses) {
foreach ($foundClasses as $name) { foreach ($foundClasses as $name) {