fix #9321 Crawler::addHtmlContent add gbk encoding support
use restore_error_handler instead of set_error_handler($previous)
fix some cs