From c88e6e0237f1c06992debea87ec76a1fe62c6bf7 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sat, 21 Oct 2017 12:02:04 +0200 Subject: [PATCH] disabling E_DEPRECATED, as contrib apps wont work under PHP 7.1 with having eg. contructors with same name as the class --- api/src/autoload.php | 8 +++++++- api/src/loader.php | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/api/src/autoload.php b/api/src/autoload.php index 08a2c53f00..624c14f612 100755 --- a/api/src/autoload.php +++ b/api/src/autoload.php @@ -20,7 +20,7 @@ if (!defined('EGW_SERVER_ROOT')) define('EGW_SERVER_ROOT', dirname(dirname(__DIR__))); define('EGW_INCLUDE_ROOT', EGW_SERVER_ROOT); define('EGW_API_INC', EGW_SERVER_ROOT.'/phpgwapi/inc'); - error_reporting(E_ALL & ~E_NOTICE & ~E_STRICT); + error_reporting(E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED); } /** @@ -115,3 +115,9 @@ if (file_exists(EGW_SERVER_ROOT.'/vendor')) { require_once EGW_SERVER_ROOT.'/vendor/autoload.php'; } + +if (!empty($GLOBALS['egw_info']['currentapp']) && isset($GLOBALS['egw_info']['apps'][$GLOBALS['egw_info']['currentapp']]) && + file_exists(EGW_SERVER_ROOT.'/'.$GLOBALS['egw_info']['currentapp'].'/vendor/autoload.php')) +{ + require_once EGW_SERVER_ROOT.'/'.$GLOBALS['egw_info']['currentapp'].'/vendor/autoload.php'; +} diff --git a/api/src/loader.php b/api/src/loader.php index 484be32c3b..aea7c0b492 100644 --- a/api/src/loader.php +++ b/api/src/loader.php @@ -24,7 +24,7 @@ use EGroupware\Api\Egw; // Only variables should be assigned by reference, eg. soetemplate::tree_walk() // Declaration of should be compatible with , varios places where method parameters change // --> switching it off for now, as it makes error-log unusable -error_reporting(E_ALL & ~E_NOTICE & ~E_STRICT); +error_reporting(E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED); if (function_exists('get_magic_quotes_runtime') && get_magic_quotes_runtime()) { set_magic_quotes_runtime(false);