From: Mikael Nordfeldth Date: Wed, 13 Jan 2016 13:24:00 +0000 (+0100) Subject: property attribute could be null in meta tags of course X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=3720e37f06654e942179a31b6e65ed2a5d0fe2a1;p=quix0rs-gnu-social.git property attribute could be null in meta tags of course --- diff --git a/plugins/Oembed/lib/opengraphhelper.php b/plugins/Oembed/lib/opengraphhelper.php index 07b5cf5d70..4573f5d8ab 100644 --- a/plugins/Oembed/lib/opengraphhelper.php +++ b/plugins/Oembed/lib/opengraphhelper.php @@ -34,7 +34,7 @@ class OpenGraphHelper } $property = $node->attributes->getNamedItem('property'); $matches = array(); - if (!preg_match(self::KEY_REGEX, $property->value, $matches)) { + if ($property === null || !preg_match(self::KEY_REGEX, $property->value, $matches)) { // not property="og:something" continue; }