Fix Warning "key() expects parameter 1 to be array, string given"
authorMichael <heluecht@pirati.ca>
Sat, 27 Mar 2021 05:20:55 +0000 (05:20 +0000)
committerMichael <heluecht@pirati.ca>
Sat, 27 Mar 2021 05:20:55 +0000 (05:20 +0000)
src/Util/ParseUrl.php

index 1810293..7c762ce 100644 (file)
@@ -942,7 +942,7 @@ class ParseUrl
                                        $siteinfo['keywords'][] = trim($keyword);
                                }
                        }
-               } else {
+               } elseif (!empty($jsonld['keywords'])) {
                        $content = JsonLD::fetchElementArray($jsonld, 'keywords');
                        if (!empty($content) && is_array($content)) {
                                $jsonldinfo['keywords'] = $content;