Fix php errors when try to display serialized inventory
Fix php error. references #1943