Skip to content

Commit 81b943d

Browse files
committed
fixed #481
1 parent 2ac3258 commit 81b943d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/LinkedData.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,13 @@ protected function fetchData(): array
7272
private static function getValue(Node $node, string ...$keys)
7373
{
7474
foreach ($keys as $key) {
75+
if (is_array($node)) {
76+
$node = array_shift($node);
77+
}
78+
if (!$node instanceof Node) {
79+
return null;
80+
}
81+
7582
$node = $node->getProperty("http://schema.org/{$key}");
7683

7784
if (!$node) {

0 commit comments

Comments
 (0)