diff --git a/lib/Doctrine/Table.php b/lib/Doctrine/Table.php index 112cc2fe4..556a281ac 100644 --- a/lib/Doctrine/Table.php +++ b/lib/Doctrine/Table.php @@ -198,10 +198,14 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable break; } - $name = $class; + $name = $class; $names[] = $name; } while ($class = get_parent_class($class)); + if ($class === false) { + throw new Doctrine_Table_Exception('Unknown component.'); + } + // reverse names $names = array_reverse($names); // save parents