using serialize to create hash to not fall short if some non-utf-8 or non-json-decodable data is in parameters

This commit is contained in:
Ralf Becker 2015-04-16 07:04:49 +00:00
parent 24478fe0d5
commit ed1c1daf4a

View File

@ -1573,7 +1573,8 @@ class egw_link extends solink
return null; return null;
} }
array_unshift($params, $method); array_unshift($params, $method);
$id = md5(json_encode($params)); $id = md5(serialize($params));
//error_log(__METHOD__."('$mime_type', '$method', ...) params=".array2string($params)." --> json=".array2string(serialize($params)).' --> id='.array2string($id));
egw_cache::setSession(__CLASS__, $id, $params); egw_cache::setSession(__CLASS__, $id, $params);
return $id; return $id;
} }