From a975c64de1df58f60a454026448645b69d97c9d8 Mon Sep 17 00:00:00 2001 From: jackbravo Date: Mon, 3 Sep 2007 15:36:56 +0000 Subject: [PATCH] Avoid using getMethod on classes that don't have that method --- 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 84ecdc91d..f28671e41 100644 --- a/lib/Doctrine/Export.php +++ b/lib/Doctrine/Export.php @@ -1047,7 +1047,8 @@ class Doctrine_Export extends Doctrine_Connection_Module while ($class->isAbstract() || ! $class->isSubclassOf($parent) || ! $class->hasMethod('setTableDefinition') || - $class->getMethod('setTableDefinition')->getDeclaringClass()->getName() !== $class->getName()) { + ( $class->hasMethod('setTableDefinition') && + $class->getMethod('setTableDefinition')->getDeclaringClass()->getName() !== $class->getName())) { $class = $class->getParentClass(); if ($class === false) {