WordPress.org

Ready to get started?Download WordPress

Forums

WP Mobile Detector Mobile Plugin
[resolved] [Plugin: WP Mobile Detector] PHP Warning: DOMDocument::loadHTML() (2 posts)

  1. Cristescu Bogdan
    Member
    Posted 1 year ago #

    I discover an error in my error_log file. This is the message:

    [14-Oct-2012 13:00:33] PHP Warning:  DOMDocument::loadHTML() [<a href='domdocument.loadhtml'>domdocument.loadhtml</a>]: htmlParseStartTag: invalid element name in Entity, line: 125 in /home/jorjette/public_html/egofelix.com/wp-content/plugins/wp-mobile-detector/functions.php on line 283
    [14-Oct-2012 13:00:33] PHP Warning:  DOMDocument::loadHTML() [<a href='domdocument.loadhtml'>domdocument.loadhtml</a>]: Unexpected end tag : strong in Entity, line: 125 in /home/jorjette/public_html/egofelix.com/wp-content/plugins/wp-mobile-detector/functions.php on line 283
    [14-Oct-2012 13:00:33] PHP Warning:  DOMDocument::loadHTML() [<a href='domdocument.loadhtml'>domdocument.loadhtml</a>]: Unexpected end tag : p in Entity, line: 216 in /home/jorjette/public_html/egofelix.com/wp-content/plugins/wp-mobile-detector/functions.php on line 283
    [14-Oct-2012 13:00:47] PHP Warning:  DOMDocument::loadHTML() [<a href='domdocument.loadhtml'>domdocument.loadhtml</a>]: Opening and ending tag mismatch: div and td in Entity, line: 100 in /home/jorjette/public_html/egofelix.com/wp-content/plugins/wp-mobile-detector/functions.php on line 283
    [14-Oct-2012 13:00:47] PHP Warning:  DOMDocument::loadHTML() [<a href='domdocument.loadhtml'>domdocument.loadhtml</a>]: Unexpected end tag : p in Entity, line: 104 in /home/jorjette/public_html/egofelix.com/wp-content/plugins/wp-mobile-detector/functions.php on line 283

    Can someone fix this problem? in the file the section with the problem is:

    if (class_exists('DOMDocument')) {
    		//Resize the images on the page
    		$dom = new DOMDocument();
    		$dom->loadHTML($html);

    i think its about resizing the images or something like that. In one week my error_log become more than 20Mb. Please fix the code man!

    http://wordpress.org/extend/plugins/wp-mobile-detector/

  2. websitezcom
    Member
    Plugin Author

    Posted 1 year ago #

    This is a common warning, nothing to worry about. It happens when the HTML on the page is not formatted properly (which is 95% of websites on the Internet).

    You can turn these off by setting "error_reporting(0);" at the top of the functions.php file inside the plugin folder.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic