From 79b887d189dafe2ce3c8995fa0c4232e0687e76b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eric=20Espi=C3=A9?= Date: Thu, 12 Oct 2017 13:54:28 +0000 Subject: [PATCH] =?UTF-8?q?N=C2=B01110=20-=20DataSynchro:=20PHP=20Notice?= =?UTF-8?q?=20Undefined=20Index=20*=20Fix=20access=20to=20REQUEST=5FURI=20?= =?UTF-8?q?when=20called=20by=20script?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit SVN:trunk[5017] --- core/dbobjectsearch.class.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/core/dbobjectsearch.class.php b/core/dbobjectsearch.class.php index da9b63431..aa6ca8bc0 100644 --- a/core/dbobjectsearch.class.php +++ b/core/dbobjectsearch.class.php @@ -1470,14 +1470,18 @@ class DBObjectSearch extends DBSearch $bCanCache = true; if (self::$m_bQueryCacheEnabled || self::$m_bTraceQueries) { - if (!empty($_SERVER['REQUEST_URI'])) + if (isset($_SERVER['REQUEST_URI'])) { $aContextData['sRequestUri'] = $_SERVER['REQUEST_URI']; } - else + else if (isset($_SERVER['SCRIPT_NAME'])) { $aContextData['sRequestUri'] = $_SERVER['SCRIPT_NAME']; } + else + { + $aContextData['sRequestUri'] = ''; + } // Need to identify the query $sOqlQuery = $oSearch->ToOql(false, null, true);