Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to solve the use of deprecated function ereg() of PHP 5.3.0 in Drupal 6.13

Anyone knows how to solve the error below?

Deprecated: Function ereg() is deprecated in C:\wamp\www\includes\file.inc on line 895

It is happening after installing Drupal 6.13 on wamp server 2.0i with PHP 5.3.0

like image 821
João Guilherme Avatar asked Jul 15 '09 17:07

João Guilherme


1 Answers

Use

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

Instead of

ereg('\.([^\.]*$)', $this->file_src_name, $extension);
like image 192
Parmendra Singh Avatar answered Sep 21 '22 18:09

Parmendra Singh