From cbd42ed05392bccb3f468f6a4da99335ee98541d Mon Sep 17 00:00:00 2001 From: drzax Date: Thu, 11 Aug 2011 12:01:26 +1000 Subject: [PATCH] This class attempts to run the extraStatics method without first checking it exists. There's no reason why a data object decorator would necessarily add extra statics. --- model/DataExtension.php | 3 +++ 1 file changed, 3 insertions(+) mode change 100755 => 100644 model/DataExtension.php diff --git a/model/DataExtension.php b/model/DataExtension.php old mode 100755 new mode 100644 index e62ec8f16..0f23a2abd --- a/model/DataExtension.php +++ b/model/DataExtension.php @@ -61,6 +61,9 @@ abstract class DataExtension extends Extension { // If the extension has been manually applied to a subclass, we should ignore that. if(Object::has_extension(get_parent_class($class), $extensionClass)) return; + + // If there aren't any extraStatics we shouldn't try to load them. + if ( ! method_exists($extensionClass, $extraStaticsMethod) ) return; $statics = call_user_func(array($extensionClass, $extraStaticsMethod), $class, $extension);