Sfoglia il codice sorgente

fix wikipedia crash

lolcat 11 mesi fa
parent
commit
cdf958d293
1 ha cambiato i file con 2 aggiunte e 6 eliminazioni
  1. 2 6
      scraper/ddg.php

+ 2 - 6
scraper/ddg.php

@@ -1974,17 +1974,13 @@ class ddg{
 		
 		if(count($tags) === 0){
 			
-			$description = [
+			$description[] = [
 				"type" => "text",
 				"value" =>
 					trim(
 						$this->fuckhtml
 						->getTextContent(
-							substr(
-								$html,
-								$start,
-								$tag["startPos"] - $start
-							),
+							$html,
 							true,
 							false
 						)