Why last release of wordpressmu-2.9.2 have some deprecated PHP functions like ereg ?
Why last release of wordpressmu-2.9.2 have some deprecated PHP functions like ereg ?
If you feel so strongly about it then why not get involved in trac and change things.
It only became depreciated in 5.3
5.3 was released 9 months ago (30-june-2009) and I need it because it resolves some grave issues always present in 5.2 branch (segfaults).
My contribution to patch is not very difficult:
identify files:
find . -name "*.php" | xargs grep ereg
./wp-admin/includes/class-ftp-pure.php
./wp-admin/includes/class-ftp-sockets.php
./wp-includes/class-phpmailer.php
./wp-includes/class-pop3.php
./wp-includes/wpmu-functions.php
and then replace:
ereg(arg1, arg2) by preg_match(%arg1%, arg2)
idem for:
ereg_replace -> preg_replace
eregi(a1, a2) -> preg_replace(/a1/i, a2)
Sorry, change tle last 2 lines by
eregi(a1, a2) -> preg_match(/a1/i, a2)
ereg_replace(a1, a2) -> preg_replace(/a1/, a2)
eregi_replace(a1, a2) -> preg_replace(/a1/i, a2)
But they are depreciated functions - they are not obsolete, and they are only warnings so it shouldn't break your site.
My contribution to patch is not very difficult:
You're in the wrong spot though:
http://core.trac.wordpress.org/
Login information is the same as the forums here.