[icinga-checkins] icinga.org: icingaweb2/feature/setup-wizard-7163: icingacli: Fix "Notice: Constant ICINGAWEB_BASEDIR already defined"

git at icinga.org git at icinga.org
Wed Nov 12 14:53:55 CET 2014


Module: icingaweb2
Branch: feature/setup-wizard-7163
Commit: a081db08a40ee137fb53af081bbc256c1869e5d4
URL:    https://git.icinga.org/?p=icingaweb2.git;a=commit;h=a081db08a40ee137fb53af081bbc256c1869e5d4

Author: Eric Lippmann <eric.lippmann at netways.de>
Date:   Wed Nov 12 14:43:58 2014 +0100

icingacli: Fix "Notice: Constant ICINGAWEB_BASEDIR already defined"

---

 library/Icinga/Application/ApplicationBootstrap.php |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/library/Icinga/Application/ApplicationBootstrap.php b/library/Icinga/Application/ApplicationBootstrap.php
index fc124b6..90e420d 100644
--- a/library/Icinga/Application/ApplicationBootstrap.php
+++ b/library/Icinga/Application/ApplicationBootstrap.php
@@ -101,7 +101,9 @@ abstract class ApplicationBootstrap
      */
     protected function __construct($configDir = null)
     {
-        define('ICINGAWEB_BASEDIR', dirname($this->getBootstrapDirecory()));
+        if (! defined('ICINGAWEB_BASEDIR')) {
+            define('ICINGAWEB_BASEDIR', dirname($this->getBootstrapDirecory()));
+        }
         define('ICINGAWEB_VENDORS', ICINGAWEB_BASEDIR . '/library/vendor');
         define('ICINGAWEB_APPDIR', ICINGAWEB_BASEDIR . '/application');
 



More information about the icinga-checkins mailing list