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

@@ -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);