language/oop5/decon.xml
9f351a14a749721a74df1dc6ac9533cf796a652e
...
...
@@ -252,7 +252,7 @@ class Product {
252
252
}
253
253

254
254
public static function fromJson(string $json): static {
255
-
$data = json_decode($json);
255
+
$data = json_decode($json, true);
256
256
return new static($data['id'], $data['name']);
257
257
}
258
258

259
259