diff options
author | Sergiy Lavryk <[email protected]> | 2017-10-05 11:46:51 -0400 |
---|---|---|
committer | Sergiy Lavryk <[email protected]> | 2017-10-05 11:46:51 -0400 |
commit | 12303d799d1c29b09f4e84a1d545388f7b302e16 (patch) | |
tree | 77b4386bd110822ff229e9afe093b39aec32ff8c | |
parent | f5dcfedf9f9f20c6a98739a4d5d23704de89bf26 (diff) |
fix for
Notice: Undefined index: og:image
in /andreskrey/readability.php/src/HTMLParser.php, line 469
-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 288d8a8..51b7afb 100644 --- a/src/HTMLParser.php +++ b/src/HTMLParser.php @@ -451,7 +451,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; } |