ereg_replace to preg_replace
Hi there, I have a very old TL installation 2.6.7 which has in controller.php
Code:
$strGdVersion = ereg_replace('[[:alpha:][:space:]()]+', '', $arrGdinfo['GD Version']);
Just a few days back my Hoster has upgraded PHP version to 5.3, and this causes a problem resulting in black jpg/jpeg pictures.
Without thinking much I've changed the above from a newer contao to (As i knew ereg function is depricated in php 5.3)
Code:
$strGdVersion = preg_replace('/[^0-9\.]+/', '', $arrGdinfo['GD Version']);
and it works. But I am not sure if this might lead to other problems. Is it ok with what I have done? Thanks
Re: ereg_replace to preg_replace
Hi,
Contao uses preg_replace() from 2.9.5 at least.