From 2206476d5567d73d2c4867ca3c1d31b2c8907177 Mon Sep 17 00:00:00 2001 From: hansbrix Date: Sat, 23 Jun 2007 22:53:00 +0000 Subject: [PATCH] avoid attempting to export non-record classes like symfony's sfDoctrineRecord --- lib/Doctrine/Export.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Doctrine/Export.php b/lib/Doctrine/Export.php index fc2ec97bc..c4ca9afda 100644 --- a/lib/Doctrine/Export.php +++ b/lib/Doctrine/Export.php @@ -993,7 +993,8 @@ class Doctrine_Export extends Doctrine_Connection_Module $conn = Doctrine_Manager::getInstance()->getConnectionForComponent($name); // check if class is an instance of Doctrine_Record and not abstract - if ($class->isSubclassOf($parent) && ! $class->isAbstract()) { + // class must have method setTableDefinition (to avoid non-Record subclasses like symfony's sfDoctrineRecord) + if ($class->isSubclassOf($parent) && ! $class->isAbstract() && method_exists($class->getName(), 'setTableDefinition')) { $record = new $name(); $table = $record->getTable(); $data = $table->getExportableFormat();