Bug #19728
closed
ereg* is deprecated in PHP 5.3 alpha3
Added by Niels Pardon almost 16 years ago.
Updated over 14 years ago.
Description
With current TYPO3 trunk I get a lot of PHP warnings like this one using PHP 5.3 alpha 3:
"Deprecated: Function ereg_replace() is deprecated in ..."
(issue imported from #M9994)
Files
Solution: use preg_replace().
There are three patches here. Which one should be used?
The latest one, 9994.KD.v2.patch. We talked about this one just today in Hamburg, would be cool to have this checked and committed finally! :)
Please test latest patch against trunk - thanks!
v4: One more thing - fixed wrong line in nusoap library for EM, that was already noted in mailing list earlier... remaining patch unchanged.
Still has ereg_replace in:
tests/regularexpression_testcase.php
typo3/class.db_list_extra.inc
typo3/cli_dispatch.phpsh
typo3/sysext/cms/tslib/media/scripts/fe_adminLib.inc
typo3/sysext/cms/tslib/media/scripts/wapversionLib.inc
Still has eregi_replace in:
typo3/sysext/cms/tslib/media/scripts/plaintextLib.inc
Still has ereg in:
t3lib/class.t3lib_sqlparser.php
typo3/class.db_list.inc
typo3/sysext/adodb/adodb/drivers/adodb-sybase.inc.php
Well, the testcase obviously needs them for testing purposes. :)
I fixed the others but ignored adodb for now (sybase is probably not usable anyway...)
New v5 patch attached.
Due to many misbehaviours of the ereg/preg stuff, this fix needs again a full and detailed review.
Seems to be working now...
Also available in: Atom
PDF