catalyst / moodle-tool_crawler

A moodle link crawling robot, find broken, slow and oversized links
https://moodle.org/plugins/tool_crawler
10 stars 17 forks source link

Crashes if external link for mod URL is invalid #145

Open tuanngocnguyen opened 4 years ago

tuanngocnguyen commented 4 years ago

Step to replicate:

Error when running 'sudo -u www-data php admin/tool/crawler/cli/crawler.php --verbose=2'

Crawling https://<moodlesite>/mod/url/view.php?id=3878052 => https:/<moodlesite>/mod/url/<a></a>/ (404) 
Default exception handler: error/invalidpersistenterror Debug: redirect: Data submitted is invalid
Error code: invalidpersistenterror
$a contents: Data submitted is invalid
* line 528 of /lib/classes/persistent.php: core\invalid_persistent_exception thrown
* line 672 of /admin/tool/crawler/classes/robot/crawler.php: call to core\persistent->update()
* line 577 of /admin/tool/crawler/classes/robot/crawler.php: call to tool_crawler\robot\crawler->crawl()
* line 81 of /admin/tool/crawler/lib.php: call to tool_crawler\robot\crawler->process_queue()
* line 55 of /admin/tool/crawler/cli/crawler.php: call to tool_crawler_crawl()