#JUGL meetings are held on the 3rd Tuesday of each month

NEXT MEETING:

News 

Find Joomla! and Joomla! London related news here.  We show the latest security updates, Joomla! announcements, information about past and upcoming meetings, and anything else we think might be relevant.

If you manage websites and have gone through or about to go update PHP to 5.3, you will almost certainly come accross the following error on your sites as a result. You may not even have know about the upgrade and suddenly start seeing these warnings all over your site:

ereg-is-deprecated in ..

If you upgraded to PHP 5.3, chances are high you’re going to run into a few warnings or deprecated function messages. An example is the ereg family of functions, which are gone for good, as they were slower and felt less familiar than the alternative Perl-compatible preg family.

To migrate ereg():

ereg('\.([^\.]*$)', $this->file_src_name, $extension);

becomes

preg_match('/\.([^\.]*$)/', $this->file_src_name, $extension);

Notice that the pattern (\.([^\.]*$)) is wrapped with / /, which are RegExp delimiters. If you find yourself escaping / too much (for an URL for example), you might want to use the # delimiter instead.

The full article  "Fix `ereg is deprecated` errors in PHP 5.3" can be read on devthought.com

but the above snippets provided me enough to work with and clean up several clients sites after my hoster upgraded PHP.