Commit e73bca30 authored by Volker Krause's avatar Volker Krause
Browse files

Harden against invalid input

parent 48fe9e92
......@@ -112,7 +112,7 @@ class Sample
foreach ($product->schema as $entry) {
if (!$entry->isScalar())
if (!property_exists($jsonObj, $entry->name))
if (!property_exists($jsonObj, $entry->name) || !is_object($jsonObj->{$entry->name}))
foreach ($entry->elements as $elem) {
if (!property_exists($jsonObj->{$entry->name}, $elem->name))
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment