Browse Source

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

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@312 a333f486-631f-4898-b8df-5754b55c2be0
dflaven 15 years ago
parent
commit
0c033ccb0f
2 changed files with 3 additions and 3 deletions
  1. 1 1
      core/cmdbsource.class.inc.php
  2. 2 2
      core/dbobject.class.php

+ 1 - 1
core/cmdbsource.class.inc.php

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

+ 2 - 2
core/dbobject.class.php

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