From e179825896f2b7e32ed7f24a0a9598ee098206c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eric=20Espi=C3=A9?= Date: Thu, 12 Oct 2017 07:52:39 +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[5007] --- core/dbobjectsearch.class.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/core/dbobjectsearch.class.php b/core/dbobjectsearch.class.php index c739dea2d5..5467f22e68 100644 --- a/core/dbobjectsearch.class.php +++ b/core/dbobjectsearch.class.php @@ -1469,7 +1469,14 @@ class DBObjectSearch extends DBSearch $aContextData = array(); if (self::$m_bQueryCacheEnabled || self::$m_bTraceQueries) { - $aContextData['sRequestUri'] = $_SERVER['REQUEST_URI']; + if (!empty($_SERVER['REQUEST_URI'])) + { + $aContextData['sRequestUri'] = $_SERVER['REQUEST_URI']; + } + else + { + $aContextData['sRequestUri'] = $_SERVER['SCRIPT_NAME']; + } // Need to identify the query $sOqlQuery = $oSearch->ToOql(false, null, true);