PHP deprecated functions in CONTRIB

PHP deprecated functions in CONTRIB

by Anthony Borrow -
Number of replies: 1
Picture of Core developers Picture of Plugin developers Picture of Testers
All folks who have CONTRIB code on Moodle's CVS server (and those who may be providing links in the Modules and Plugins database too), there are several PHP functions that were deprecated in PHP 5.3 (http://php.net/manual/en/migration53.deprecated.php). Several issues have been created in the tracker to deal with the deprecated functions in Moodle core. The principal issue is MDL-20821 (deprecation of ereg_replace and eregi_replace function) which links to the other deprecated issues:

MDL-20876 (deprecated php function split)
MDL-20877 (deprecated php function set_magic_quotes_runtime)
MDL-20878 (deprecated function mysql_escape_string)
MDL-20879 (deprecated function define_syslog_variables)
MDL-20880 (deprecated function dl)
MDL-20881 (deprecated function session_unregister)

I would encourage maintainers of CONTRIB code to review their code for these deprecated functions and remove their use. Do not hesitate to let me know if there is anything I can do to be helpful. Peace - Anthony
Average of ratings: -
In reply to Anthony Borrow

Re: PHP deprecated functions in CONTRIB

by Andrew Davis -
There's a full list of stuff that was deprecated in php 5.3 here.
http://php.net/manual/en/migration53.deprecated.php

Anything deprecated in 5.3 will be gone entirely in php 6. Its not super urgent but I'd recommend getting a handle on any deprecated functions you're using sooner rather than later. Replacement functions may operate in subtly different ways so you'll want to leave yourself plenty of time to flush out any bugs introduced by the switch.