compuphase / sphider-pdo

A simple search engine and spider in PHP
GNU General Public License v2.0
31 stars 14 forks source link

PHP 7.2 #8

Closed nassiobg closed 2 years ago

nassiobg commented 6 years ago

The function each() is deprecated and now must change this:

this is an example at commonfuncs.php

   /* common word list (words to ignore in the search query) */
   $common = array();
   $lines = @file($include_dir.'/common.txt');
   if (is_array($lines)) {

// while (list($id, $word) = each($lines)) // each deprecated at php 7.2 foreach ($lines as ($id)->$word) $common[trim($word)] = 1; }

if this works, I'll send the file.

compuphase commented 2 years ago

Fixed in commit f4dfad0a6a0e8836821ca32332f9f475f51d4023. Thanks.