diff options
author | Andres Rey <[email protected]> | 2016-12-21 14:04:54 -0300 |
---|---|---|
committer | Andres Rey <[email protected]> | 2016-12-21 14:04:54 -0300 |
commit | f5fb536ffd0f247c0ee5f633089c15f66fbba481 (patch) | |
tree | 255187cd9ab67add901fe5d888fe779388bf218a /src | |
parent | 984ded395de1982a773f9639481552550c5e17ef (diff) |
Added safe check when getting the article title.
Diffstat (limited to 'src')
-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 fbf3455..43cf505 100644 --- a/src/HTMLParser.php +++ b/src/HTMLParser.php @@ -368,7 +368,7 @@ class HTMLParser } $title = $this->dom->getElementsByTagName('title'); - if ($title) { + if ($title->length > 0) { return $title->item(0)->nodeValue; } |