andreskrey/readability.php

Type error: Argument 1 passed to iterator_to_array() must implement interface Traversable, null given in vendor/andreskrey/readability.php/src/Readability.php (line 1274)

Closed this issue · 2 comments

Here is one reference html for this error: https://gist.github.com/Slityak/070b8e8e44bf87981892d29ff4db1a04

Not sure but I think the error occurs when <td> have only one child (firstChild) without children but simple text. Like this part:

<table width="100%" border="0" cellspacing="0" cellpadding="5"> 
  <tbody>
    <tr> 
      <td> 
        <div align="center">
          Summer Hockey Clinic Registration Form 
        </div>
      </td> 
    </tr> 
  </tbody>
</table>

Was able to trigger this error with the latest development version. Must be a weird node shifting issue. I'll check it out this weekend. Thanks

Fixed via a4bd07a

New version will be released shortly™