[icinga-checkins] icinga.org: icingaweb2-module-director/master: CustomVariable: fix issues with PHP bug #43200

git at icinga.org git at icinga.org
Mon Nov 21 22:45:07 CET 2016


Module: icingaweb2-module-director
Branch: master
Commit: db61528748fa53befc916ab81b1286ec40eb5c73
URL:    https://git.icinga.org/?p=icingaweb2-module-director.git;a=commit;h=db61528748fa53befc916ab81b1286ec40eb5c73

Author: Thomas Gelf <thomas at gelf.net>
Date:   Mon Nov 21 22:44:31 2016 +0100

CustomVariable: fix issues with PHP bug #43200

fixes #13271

---

 library/Director/CustomVariable/CustomVariable.php |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/library/Director/CustomVariable/CustomVariable.php b/library/Director/CustomVariable/CustomVariable.php
index 242ae3d..d78fcb7 100644
--- a/library/Director/CustomVariable/CustomVariable.php
+++ b/library/Director/CustomVariable/CustomVariable.php
@@ -82,7 +82,14 @@ abstract class CustomVariable implements IcingaConfigRenderer
 
     abstract public function getValue();
 
-    abstract public function toConfigString($renderExpressions = false);
+    public function toConfigString($renderExpressions = false)
+    {
+        // TODO: this should be an abstract method once we deprecate PHP < 5.3.9
+        throw new ProgrammingError(
+            '%s has no toConfigString() implementation',
+            get_class($this)
+        );
+    }
 
     public function isNew()
     {



More information about the icinga-checkins mailing list