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; }