From 8eced58ba0eeb8c7ab48a3deb0f480d4dd20d8df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garc=C3=ADa?= Date: Mon, 14 Jul 2014 19:16:28 +0200 Subject: [PATCH] Removed @ operator from dol_include_once Adding @ operator to include_once makes include errors untraceable, it shouldn't be there. Errors must be thrown so that we notice them. It is PHP configuration's choice to decide wether to log them or print them. --- htdocs/core/lib/functions.lib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index b1f11590bdc..78326ee3bb7 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -243,9 +243,9 @@ function dol_include_once($relpath, $classname='') global $conf,$langs,$user,$mysoc; // Other global var must be retreived with $GLOBALS['var'] if (! empty($classname) && ! class_exists($classname)) { - return @include dol_buildpath($relpath); // Remove @ to find error into php log file if you have problems + return include dol_buildpath($relpath); } else { - return @include_once dol_buildpath($relpath); // Remove @ to find error into php log file if you have problems + return include_once dol_buildpath($relpath); } }