N°1110 - DataSynchro: PHP Notice Undefined Index

* Fix access to REQUEST_URI when called by script

SVN:trunk[5017]
This commit is contained in:
Eric Espié
2017-10-12 13:54:28 +00:00
parent 8dc92e7ccf
commit 79b887d189

View File

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