From 05b54656902efd2f1b0e3faffa00fb322234d714 Mon Sep 17 00:00:00 2001 From: "Hahn Axel (hahn)" <axel.hahn@unibe.ch> Date: Wed, 5 Jul 2023 14:50:25 +0200 Subject: [PATCH] dont show php warning on wrong project id --- public_html/deployment/classes/project.class.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/public_html/deployment/classes/project.class.php b/public_html/deployment/classes/project.class.php index bee8617b..fc4bbe93 100644 --- a/public_html/deployment/classes/project.class.php +++ b/public_html/deployment/classes/project.class.php @@ -1486,6 +1486,10 @@ class project extends base { if (isset($this->_aConfig['projects']['json']['active']) && $this->_aConfig['projects']['json']['active']) { + $sCfgfile=$this->_getConfigFile($sId); + if (!$sCfgfile || !file_exists($sCfgfile)){ + return false; + } $this->_aPrjConfig = json_decode(file_get_contents($this->_getConfigFile($sId)), true); } if (isset($this->_aConfig['projects']['ldap']['active']) && $this->_aConfig['projects']['ldap']['active']) { -- GitLab