The MU forums have moved to WordPress.org

wpmu-2.9.2 still with deprecated PHP functions (6 posts)

  1. dax@enst.fr
    Member
    Posted 14 years ago #

    Why last release of wordpressmu-2.9.2 have some deprecated PHP functions like ereg ?

  2. SteveAtty
    Member
    Posted 14 years ago #

    If you feel so strongly about it then why not get involved in trac and change things.

    It only became depreciated in 5.3

  3. dax@enst.fr
    Member
    Posted 14 years ago #

    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)

  4. dax@enst.fr
    Member
    Posted 14 years ago #

    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)

  5. SteveAtty
    Member
    Posted 14 years ago #

    But they are depreciated functions - they are not obsolete, and they are only warnings so it shouldn't break your site.

  6. tdjcbe
    Member
    Posted 14 years ago #

    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.

About this Topic

  • Started 14 years ago by dax@enst.fr
  • Latest reply from tdjcbe