summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Readability.php5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/Readability.php b/src/Readability.php
index c55e0ad..4ee85e1 100644
--- a/src/Readability.php
+++ b/src/Readability.php
@@ -50,10 +50,7 @@ class Readability extends Element implements ReadabilityInterface
* An if must be added before calling the getAttribute function, because if we reach the DOMDocument
* by getting the node parents we'll get a undefined function fatal error
*/
- $score = 0;
-
- // Check if the getAttribute method exists, as some elements lack of it (and calling it anyway throws an exception)
- if (method_exists($node, 'getAttribute')) {
+ if (method_exists($node, 'getAttribute')) {
if ($node->hasAttribute('data-readability')) {
// Node was initialized previously. Restoring score and setting flag.
$this->initialized = true;