mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-21 09:38:48 +02:00
Reviewed and changed a bug fix (No TRAC entry) on the display of external fields when the external key is null. The actual fix is to consider that null is a value. Isset() should be used with care because one could not differentiate a missing value (in an array or a value that is null)
SVN:trunk[205]
This commit is contained in:
@@ -209,7 +209,9 @@ abstract class DBObject
|
||||
|
||||
// Note: we assume that, for a given attribute, if it can be loaded,
|
||||
// then one column will be found with an empty suffix, the others have a suffix
|
||||
if (isset($aRow[$sAttCode]))
|
||||
// Take care: the function isset will return false in case the value is null,
|
||||
// which is something that could happen on open joins
|
||||
if (array_key_exists($sAttCode, $aRow))
|
||||
{
|
||||
$value = $oAttDef->FromSQLToValue($aRow, $sAttCode);
|
||||
|
||||
@@ -317,7 +319,7 @@ abstract class DBObject
|
||||
$this->Reload();
|
||||
}
|
||||
$this->ComputeFields();
|
||||
return isset($this->m_aCurrValues[$sAttCode]) ? $this->m_aCurrValues[$sAttCode] : '';
|
||||
return $this->m_aCurrValues[$sAttCode];
|
||||
}
|
||||
|
||||
public function GetOriginal($sAttCode)
|
||||
|
||||
Reference in New Issue
Block a user