From 41433f12115f8732105692138b682ff2f1e4329e Mon Sep 17 00:00:00 2001 From: Sean Harvey Date: Thu, 12 Apr 2012 12:06:02 +1200 Subject: [PATCH] BUGFIX Fixing FulltextSearchable and Hierarchy to conform to the parent DataExtension for E_STRICT compliance. --- model/Hierarchy.php | 2 +- search/FulltextSearchable.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/model/Hierarchy.php b/model/Hierarchy.php index b8e988e3f..78e3f934b 100644 --- a/model/Hierarchy.php +++ b/model/Hierarchy.php @@ -25,7 +25,7 @@ class Hierarchy extends DataExtension { function augmentWrite(&$manipulation) { } - static function add_to_class($class, $extensionClass, $args) { + static function add_to_class($class, $extensionClass, $args = null) { Config::inst()->update($class, 'has_one', array('Parent' => $class)); parent::add_to_class($class, $extensionClass, $args); } diff --git a/search/FulltextSearchable.php b/search/FulltextSearchable.php index a69c13436..d3449c444 100644 --- a/search/FulltextSearchable.php +++ b/search/FulltextSearchable.php @@ -75,7 +75,7 @@ class FulltextSearchable extends DataExtension { parent::__construct(); } - static function add_to_class($class, $extensionClass, $args) { + static function add_to_class($class, $extensionClass, $args = null) { Config::inst()->update($class, 'indexes', array('SearchFields' => array( 'type' => 'fulltext', 'name' => 'SearchFields', @@ -90,7 +90,7 @@ class FulltextSearchable extends DataExtension { * * @return Array */ - function get_searchable_classes() { + static function get_searchable_classes() { return self::$searchable_classes; }