Title: [Plugin: WP Mobile Detector] PHP Warning:  DOMDocument::loadHTML()
Last modified: August 20, 2016

---

# [Plugin: WP Mobile Detector] PHP Warning: DOMDocument::loadHTML()

 *  Resolved [Cristescu Bogdan](https://wordpress.org/support/users/cbogdan/)
 * (@cbogdan)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/plugin-wp-mobile-detector-php-warning-domdocumentloadhtml/)
 * 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/](http://wordpress.org/extend/plugins/wp-mobile-detector/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [websitezcom](https://wordpress.org/support/users/websitezcom/)
 * (@websitezcom)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/plugin-wp-mobile-detector-php-warning-domdocumentloadhtml/#post-3116275)
 * 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.

Viewing 1 replies (of 1 total)

The topic ‘[Plugin: WP Mobile Detector] PHP Warning: DOMDocument::loadHTML()’ is
closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-mobile-detector_899b74.svg)
 * [WP Mobile Detector](https://wordpress.org/plugins/wp-mobile-detector/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-mobile-detector/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-mobile-detector/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-mobile-detector/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-mobile-detector/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-mobile-detector/reviews/)

## Tags

 * [domdocument](https://wordpress.org/support/topic-tag/domdocument/)
 * [PHP Warning](https://wordpress.org/support/topic-tag/php-warning/)

 * 1 reply
 * 2 participants
 * Last reply from: [websitezcom](https://wordpress.org/support/users/websitezcom/)
 * Last activity: [13 years, 5 months ago](https://wordpress.org/support/topic/plugin-wp-mobile-detector-php-warning-domdocumentloadhtml/#post-3116275)
 * Status: resolved