Symfony Exception

ValueError

HTTP 500 Internal Server Error

DOMDocument::loadHTML(): Argument #1 ($source) must not be empty

Exception

ValueError

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

Stack Trace

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)