property attribute could be null in meta tags of course

This commit is contained in:
Mikael Nordfeldth 2016-01-13 14:24:00 +01:00
parent 99da1ebe41
commit 3720e37f06

View File

@ -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;
}