N°3166 - fix for a crash in expressioncache

iTop was crashing if the expression/format for the name of a class contained a quote (')
This commit is contained in:
Denis Flaven
2020-07-10 11:15:09 +02:00
parent df4dfe4803
commit ea75092bb3

View File

@@ -118,7 +118,7 @@ EOF;
{
$sKey = static::GetKey($sClass, $sAttCode);
$oExpr = DBObjectSearch::GetPolymorphicExpression($sClass, $sAttCode);
return "'".$sKey."' => '".serialize($oExpr)."',\n";
return var_export($sKey, true)." => ".var_export(serialize($oExpr), true).",\n"; // Beware, string values can contain quotes, backslashes, etc!
}
/**