(Retrofit from trunk)

N°1110 - DataSynchro: PHP Notice Undefined Index
* Fix access to REQUEST_URI when called by script [from revisions 5007, 5017]

SVN:2.4[5018]
This commit is contained in:
Eric Espié
2017-10-12 13:57:31 +00:00
parent 23268e8969
commit e896f8af3d

View File

@@ -1469,7 +1469,18 @@ class DBObjectSearch extends DBSearch
$aContextData = array();
if (self::$m_bQueryCacheEnabled || self::$m_bTraceQueries)
{
$aContextData['sRequestUri'] = $_SERVER['REQUEST_URI'];
if (isset($_SERVER['REQUEST_URI']))
{
$aContextData['sRequestUri'] = $_SERVER['REQUEST_URI'];
}
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);