N°1110 - DataSynchro: PHP Notice Undefined Index

* Fix access to REQUEST_URI when called by script

SVN:trunk[5007]
This commit is contained in:
Eric Espié
2017-10-12 07:52:39 +00:00
parent 94a561f0e4
commit e179825896

View File

@@ -1468,8 +1468,15 @@ class DBObjectSearch extends DBSearch
// //
$aContextData = array(); $aContextData = array();
if (self::$m_bQueryCacheEnabled || self::$m_bTraceQueries) if (self::$m_bQueryCacheEnabled || self::$m_bTraceQueries)
{
if (!empty($_SERVER['REQUEST_URI']))
{ {
$aContextData['sRequestUri'] = $_SERVER['REQUEST_URI']; $aContextData['sRequestUri'] = $_SERVER['REQUEST_URI'];
}
else
{
$aContextData['sRequestUri'] = $_SERVER['SCRIPT_NAME'];
}
// Need to identify the query // Need to identify the query
$sOqlQuery = $oSearch->ToOql(false, null, true); $sOqlQuery = $oSearch->ToOql(false, null, true);