Explorar o 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 %!s(int64=10) %!d(string=hai) anos
pai
achega
a2aa028c2b
Modificáronse 1 ficheiros con 4 adicións e 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);