Explorar el Código

Bug fix: prevent a crash of the web services when trying to log a non scalar paramater value...

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@3549 a333f486-631f-4898-b8df-5754b55c2be0
dflaven hace 10 años
padre
commit
a2aa028c2b
Se han modificado 1 ficheros con 4 adiciones y 0 borrados
  1. 4 0
      application/applicationextension.inc.php

+ 4 - 0
application/applicationextension.inc.php

@@ -783,6 +783,10 @@ class RestUtils
 		{
 			$realValue = self::MakeValue($sClass, $sAttCode, $value);
 			$oSearch->AddCondition($sAttCode, $realValue, '=');
+			if (is_object($value) || is_array($value))
+			{
+				$value = json_encode($value);
+			}
 			$aCriteriaReport[] = "$sAttCode: $value ($realValue)";
 		}
 		$oSet = new DBObjectSet($oSearch);