From: Marcin Haba Date: Fri, 13 Mar 2015 20:57:29 +0000 (+0100) Subject: baculum: Fix support for PHP 5.6 X-Git-Tag: Release-7.2.0~73 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=935dbb42beca79ec3a994d49831bfe98727583c2;p=bacula%2Fbacula baculum: Fix support for PHP 5.6 --- diff --git a/gui/baculum/protected/Class/BaculumAPI.php b/gui/baculum/protected/Class/BaculumAPI.php index 4d6898fa5e..46c152f757 100644 --- a/gui/baculum/protected/Class/BaculumAPI.php +++ b/gui/baculum/protected/Class/BaculumAPI.php @@ -39,6 +39,12 @@ abstract class BaculumAPI extends TPage public function onInit($params) { parent::onInit($params); + /* + * Workaround to bug in PHP 5.6 by FastCGI that caused general protection error. + * TODO: Check on newer PHP if it is already fixed. + */ + $db = new ActiveRecord(); + $db->getDbConnection(); $this->director = isset($this->Request['director']) ? $this->Request['director'] : null; $this->user = isset($this->Request['user']) ? $this->Request['user'] : null; if(is_null($this->user) && $this->Application->getModule('configuration')->isApplicationConfig() === true) {