Fix PHP Notices from document.parser