$disableEntities = libxml_disable_entity_loader(true); $dom = new \DOMDocument('1.0', $charset); $dom->validateOnParse = true; @$dom->loadHTML($content); libxml_disable_entity_loader($disableEntities); $this->addDocument($dom); $disableEntities = libxml_disable_entity_loader(true); $dom = new \DOMDocument('1.0', $charset); $dom->validateOnParse = true; @$dom->loadHTML($content); libxml_disable_entity_loader($disableEntities); $this->addDocument($dom); } if ('x' === $matches[1]) { $this->addXmlContent($content, $charset); } else { $this->addHtmlContent($content, $charset); } } /** * Adds an HTML content to the list of nodes.try{ $results = array(); $crawler = new Crawler(); $crawler->addContent($html); $results['votes'] = $crawler->filter('meta[itemprop="ratingCount"]')->attr('content'); $results['average'] = round($crawler->filter('meta[itemprop="ratingValue"]')->attr('content') * 2,1); if(( !file_exists($localfile)) || (file_exists($localfile) && ((time() - filemtime($localfile)) / 60) > $cache_minutes) || (file_exists($localfile) && filesize($localfile) == 0)){ if($php){ ob_start(); include $url; $contents = ob_get_contents(); ob_end_clean(); } else { /* CSS */add_theme_script(siteurl() . 'modules/rating/assets/css/style.css', 'rating', 4);/* FEEDS */fetch_feed_cache(ROOT."modules/rating/feeds/ictwaarborg.php","ictwaarborg", 120, true); } if(file_exists(ABSPATH."/modules/".$module->getName()."/".$module->getFile() )){ $container = $this->container; include(ABSPATH."/modules/".$module->getName()."/".$module->getFile()); if(file_exists(ABSPATH.'modules/'.$module->getName().'/config.yml')){ $currentParameters = $this->container->getParameter('permissions'); $this->loadFilters(); //load modules $this->loadModules(); modules_loaded(); $debugger = $this->container->get('debugger');//$loader->add('Imod', __DIR__.'/lib/');require_once "src/Imod.php";Imod::getInstance()->run();?><?php //start imod require("app/load.php");?>|
ValueError
|
|---|
ValueError:
DOMDocument::loadHTML(): Argument #1 ($source) must not be empty
at /home/rvapp/domains/monitor.rvwebsolutions.app/public_html/modules/rating/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/Crawler.php:127
at DOMDocument->loadHTML()
(/home/rvapp/domains/monitor.rvwebsolutions.app/public_html/modules/rating/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/Crawler.php:127)
at Symfony\Component\DomCrawler\Crawler->addHtmlContent()
(/home/rvapp/domains/monitor.rvwebsolutions.app/public_html/modules/rating/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/Crawler.php:108)
at Symfony\Component\DomCrawler\Crawler->addContent()
(/home/rvapp/domains/monitor.rvwebsolutions.app/public_html/modules/rating/feeds/ictwaarborg.php:12)
at include('/home/rvapp/domains/monitor.rvwebsolutions.app/public_html/modules/rating/feeds/ictwaarborg.php')
(/home/rvapp/domains/monitor.rvwebsolutions.app/public_html/app/src/functions.php:634)
at fetch_feed_cache()
(/home/rvapp/domains/monitor.rvwebsolutions.app/public_html/modules/rating/rating.php:19)
at include('/home/rvapp/domains/monitor.rvwebsolutions.app/public_html/modules/rating/rating.php')
(/home/rvapp/domains/monitor.rvwebsolutions.app/public_html/app/src/Imod.php:276)
at Imod->loadModules()
(/home/rvapp/domains/monitor.rvwebsolutions.app/public_html/app/src/Imod.php:163)
at Imod->run()
(/home/rvapp/domains/monitor.rvwebsolutions.app/public_html/app/load.php:20)
at require('/home/rvapp/domains/monitor.rvwebsolutions.app/public_html/app/load.php')
(/home/rvapp/domains/monitor.rvwebsolutions.app/public_html/index.php:3)
|