diff options
author | Andres Rey <[email protected]> | 2017-10-05 16:51:06 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2017-10-05 16:51:06 +0100 |
commit | 43518062e96aed360294927574f63e58f426b031 (patch) | |
tree | 77646462e3e16bcec9ed8bd353a03995841d5790 | |
parent | c7f4193c62748455db8cf084707bdb6238696779 (diff) | |
parent | 12303d799d1c29b09f4e84a1d545388f7b302e16 (diff) |
Merge pull request #24 from jagermesh/UndefinedIndex
Fix for Notice: Undefined index: og:image
-rw-r--r-- | src/HTMLParser.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/HTMLParser.php b/src/HTMLParser.php index b1a5809..903e466 100644 --- a/src/HTMLParser.php +++ b/src/HTMLParser.php @@ -466,7 +466,7 @@ class HTMLParser } if (array_key_exists('og:image', $values) || array_key_exists('twitter:image', $values)) { - $metadata['image'] = ($values['og:image']) ? $values['og:image'] : $values['twitter:image']; + $metadata['image'] = array_key_exists('og:image', $values) ? $values['og:image'] : $values['twitter:image']; } else { $metadata['image'] = null; } |