- Fixed bug #87: Strings consisting only of digits are not managed as strings

SVN:trunk[312]
This commit is contained in:
Denis Flaven
2010-02-26 15:29:30 +00:00
parent 22a0030a62
commit 10fa31807b
2 changed files with 3 additions and 3 deletions

View File

@@ -159,7 +159,7 @@ class CMDBSource
$value = stripslashes($value);
}
// Quote if not a number or a numeric string
if ($bAlways || !is_numeric($value))
if ($bAlways || is_string($value))
{
$value = $cQuoteStyle . mysql_real_escape_string($value, self::$m_resDBLink) . $cQuoteStyle;
}

View File

@@ -229,7 +229,7 @@ abstract class DBObject
}
public function Set($sAttCode, $value)
{
{
if ($sAttCode == 'finalclass')
{
// Ignore it - this attribute is set upon object creation and that's it
@@ -568,7 +568,7 @@ abstract class DBObject
$aDelta = array();
foreach ($aProposal as $sAtt => $proposedValue)
{
if (!array_key_exists($sAtt, $this->m_aOrigValues) || ($this->m_aOrigValues[$sAtt] != $proposedValue))
if (!array_key_exists($sAtt, $this->m_aOrigValues) || ($this->m_aOrigValues[$sAtt] !== $proposedValue))
{
$aDelta[$sAtt] = $proposedValue;
}