pull/72/head
Jeremy Benoist 4 years ago
parent 441c4ddfb2
commit c070abc026
No known key found for this signature in database
GPG Key ID: BCA73962457ACC3C
  1. 2
      .github/workflows/continuous-integration.yml
  2. 2
      src/Readability.php

@ -54,7 +54,7 @@ jobs:
run: "mkdir -p build/logs" run: "mkdir -p build/logs"
- name: "Run PHPUnit" - name: "Run PHPUnit"
run: "php vendor/bin/simple-phpunit -v" run: "php vendor/bin/simple-phpunit -v --filter=testWithWipedBody"
phpunit-coverage: phpunit-coverage:
name: "PHPUnit coverage (PHP ${{ matrix.php }})" name: "PHPUnit coverage (PHP ${{ matrix.php }})"

@ -265,7 +265,7 @@ class Readability implements LoggerAwareInterface
// without tidy the body can (sometimes) be wiped, so re-create it // without tidy the body can (sometimes) be wiped, so re-create it
try { try {
var_dump($this->body, property_exists($this->body, 'childNodes'), isset($this->body->childNodes)); var_dump($this->body, property_exists($this->body, 'childNodes'), isset($this->body->childNodes), $this->body->childNodes);
if (!(property_exists($this->body, 'childNodes') && null !== $this->body->childNodes)) { if (!(property_exists($this->body, 'childNodes') && null !== $this->body->childNodes)) {
$this->body = $this->dom->createElement('body'); $this->body = $this->dom->createElement('body');
} }

Loading…
Cancel
Save