mmerian/phpcrawl

Excuse me, is not compatible with php7.1 yao

Closed this issue · 2 comments

PHP Warning:  Declaration of MyCrawler::handleDocumentInfo($DocInfo) should be compatible with PHPCrawler::handleDocumentInfo(PHPCrawlerDocumentInfo $PageInfo) in /var/www/srclast/PHPCrawl/rsclast.class.php on line 10
Page requested: https://security.alibaba.com/top.htm?spm=0.0.0.0.gqgp1o&time= ()
Referer-page: 
Content not received

Summary:
Links followed: 1
Documents received: 0
Bytes received: 0 bytes
Process runtime: 1.7769010066986 sec
root@ydxred:/var/www/srclast/PHPCrawl# 

It is not compatible with php7.1 excuse me

Hi,

Looks like the warning comes from the MyCrawler class, which overrides the handleDocumentInfo method from PHPCrawler.

Did you declare this handleDocumentInfo this way :

function handleDocumentInfo($PageInfo) { ... }

If you did, I believe you should declare it this way :

function handleDocumentInfo(PHPCrawlerDocumentInfo $PageInfo) { ... }