NVious Designs
NVious Designs

Reputation: 11

"eregi" worked in php5.6, but "preg_match" replacement not working in php 7.2

""Eregi" works in php5.6 for this Photo Gallery Module: http://taraskrysa.com/pages/media/photo_gallery.php

BUT, preg_match in php7.2 does not work for the same Gallery Module. I currently changed eregi to preg_match on the page link below, but no images are pulled from the folder assigned to the gallery and no errors show up either: http://www.carefreeseniors.com/pages/gallery/birthdays.php

I have changed eregi to preg_match in the view.php file

// Read the picture directory:

while (($filename = readdir($d)) !== false) {

    if ($filename == $thumbdir || ($filename == '..' && $dirname == '') || ($filename != '..' && substr($filename, 0, 1) == '.')) {

        continue;

    }

    $file = $realdir . $delim . $filename;

    if (is_dir($file)) {

        $dirs[] = $filename;

    } elseif (preg_match($query, $file)) { 

        $pics[] = $filename;

    }

}

I was hoping that changing the eregi to preg_match would fix the issue and pull the photos into the gallery. But, it's not working and all the Galleries of this site are now not showing up. Any help would be appreciated.

I am happy to supply the entire Module if it helps get this resolved quickly.

Upvotes: 1

Views: 113

Answers (0)

Related Questions