summaryrefslogtreecommitdiff
path: root/modules/profile
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2008-09-05 09:25:52 +0000
committerDries Buytaert <dries@buytaert.net>2008-09-05 09:25:52 +0000
commit2b0766503392aaf91837b64ca6a0a3c6d2f035ce (patch)
tree0f22a3b443809d12fe13b563b615ed7a0e0df0f5 /modules/profile
parent4231e3e98ba477e34a424bbc2e766e6f3ba42411 (diff)
downloadbrdo-2b0766503392aaf91837b64ca6a0a3c6d2f035ce.tar.gz
brdo-2b0766503392aaf91837b64ca6a0a3c6d2f035ce.tar.bz2
- Patch #64967 by Arancaytar, meba: ereg -> preg for performance reasons and future compatilbility. PHP6 is rumoured to drop ereg support.
Diffstat (limited to 'modules/profile')
-rw-r--r--modules/profile/profile.module4
1 files changed, 2 insertions, 2 deletions
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;