Skip to content
This repository was archived by the owner on Aug 14, 2021. It is now read-only.

Parsing never ends + lot of PHP NoticeΒ #93

@blat

Description

@blat

I'm trying to parse content of this article: http://www.jornalcorreiodonorte.com.br/2.1149/com-a-chegada-do-ver%C3%A3o-aten%C3%A7%C3%A3o-deve-ser-redobrada-com-os-c%C3%A3es-1.2191389
I'm using v2.1.0.

This produces a lot of PHP Notice:

PHP Notice:  Trying to get property 'nodeName' of non-object in vendor/andreskrey/readability.php/src/Readability.php on line 1079
PHP Notice:  Trying to get property 'contentScore' of non-object in vendor/andreskrey/readability.php/src/Readability.php on line 1080
PHP Notice:  Trying to get property 'contentScore' of non-object in vendor/andreskrey/readability.php/src/Readability.php on line 1091
PHP Notice:  Trying to get property 'parentNode' of non-object in vendor/andreskrey/readability.php/src/Readability.php on line 1092

Those 4 lines are repeated million times (I guess we are in an infinite loop).

My code is very simple:

$readability = new andreskrey\Readability\Readability(new andreskrey\Readability\Configuration());
$readability->parse(file_get_contents('http://www.jornalcorreiodonorte.com.br/2.1149/com-a-chegada-do-ver%C3%A3o-aten%C3%A7%C3%A3o-deve-ser-redobrada-com-os-c%C3%A3es-1.2191389'));

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions