From 2b0766503392aaf91837b64ca6a0a3c6d2f035ce Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Fri, 5 Sep 2008 09:25:52 +0000 Subject: - Patch #64967 by Arancaytar, meba: ereg -> preg for performance reasons and future compatilbility. PHP6 is rumoured to drop ereg support. --- modules/profile/profile.module | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules/profile') diff --git a/modules/profile/profile.module b/modules/profile/profile.module index 36b653cea..c5ade96b1 100644 --- a/modules/profile/profile.module +++ b/modules/profile/profile.module @@ -276,7 +276,7 @@ function profile_view_field($user, $field) { ); return strtr($format, $replace); case 'list': - $values = split("[,\n\r]", $value); + $values = preg_split("/[,\n\r]/", $value); $fields = array(); foreach ($values as $value) { if ($value = trim($value)) { @@ -387,7 +387,7 @@ function profile_form_profile($edit, $user, $category, $register = FALSE) { break; case 'selection': $options = $field->required ? array() : array('--'); - $lines = split("[,\n\r]", $field->options); + $lines = preg_split("/[,\n\r]/", $field->options); foreach ($lines as $line) { if ($line = trim($line)) { $options[$line] = $line; -- cgit v1.2.3