From 29124aed0ae5dca9d2042360e911a472a024a700 Mon Sep 17 00:00:00 2001 From: mi3ll Date: Wed, 27 Jan 2016 10:51:38 +1100 Subject: [PATCH] Change constructor name for compatibility with PHP7 http://php.net/manual/en/migration70.deprecated.php --- code/BetterNavigator.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/code/BetterNavigator.php b/code/BetterNavigator.php index 0904709..824ef54 100755 --- a/code/BetterNavigator.php +++ b/code/BetterNavigator.php @@ -22,7 +22,9 @@ class BetterNavigator extends DataExtension { * * @return string */ - public function BetterNavigator() { + public function __construct() { + parent::__construct(); + // Make sure this is a page if (!($this->owner && $this->owner->dataRecord && $this->owner->dataRecord instanceof SiteTree && $this->owner->dataRecord->ID > 0)) return false;