From 6d1ce5c4b336c0df76cac86825f344dd8fd78073 Mon Sep 17 00:00:00 2001 From: Marc Espiard Date: Mon, 29 Oct 2018 13:55:56 +1300 Subject: [PATCH] Ensure compatibility with SS 3.7 & PHP 7.2 --- _config.php | 6 ++++++ code/RecursionReader.php | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/_config.php b/_config.php index 731deca..90838b5 100755 --- a/_config.php +++ b/_config.php @@ -17,3 +17,9 @@ */ ); + +// Ensure compatibility with PHP 7.2 ("object" is a reserved word), +// with SilverStripe 3.6 (using Object) and SilverStripe 3.7 (using SS_Object) +if (!class_exists('SS_Object')) { + class_alias('Object', 'SS_Object'); +} diff --git a/code/RecursionReader.php b/code/RecursionReader.php index 7330a4f..489c508 100755 --- a/code/RecursionReader.php +++ b/code/RecursionReader.php @@ -1,6 +1,6 @@ event = $event; $this->datetimeClass = $event->Parent()->getDateTimeClass(); $this->eventClass = $event->Parent()->getEventClass();