Permalink
Browse files

Bug #17730 Patch: Avoid ereg, using preg_match

git-svn-id: http://svn.php.net/repository/pear/packages/Date/trunk@302735 c90b9560-bf6c-de11-be94-00142212c4b1
  • Loading branch information...
CloCkWeRX committed Aug 24, 2010
1 parent 8ec72c0 commit c542314f35402db1be8c925849c2161b28a4177e
Showing with 1 addition and 1 deletion.
  1. +1 −1 Date/Calc.php
View
@@ -2351,7 +2351,7 @@ function getMonthFromFullName($month)
$month = strtolower($month);
$months = Date_Calc::getMonthNames();
while (list($id, $name) = each($months)) {
- if (ereg($month, strtolower($name))) {
+ if (preg_match('/' . $month . '/', strtolower($name))) {
return $id;
}
}

0 comments on commit c542314

Please sign in to comment.