From faeb3a6a2f17b6fb25f4e19e70bfc7a0544632fb Mon Sep 17 00:00:00 2001 From: shrykedude Date: Fri, 13 Feb 2004 04:42:47 +0000 Subject: [PATCH] (Fix for bug #896172) Corrected quote type for regex matching; Changed to proper function for string replacement --- phpgwapi/inc/class.validator.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phpgwapi/inc/class.validator.inc.php b/phpgwapi/inc/class.validator.inc.php index acf73d6835..77ca1ee451 100644 --- a/phpgwapi/inc/class.validator.inc.php +++ b/phpgwapi/inc/class.validator.inc.php @@ -29,7 +29,7 @@ /* check if string contains any whitespace */ function has_space ($text) { - return ereg('( |\n|\t|\r)+', $text); + return ereg("( |\n|\t|\r)+", $text); } function chconvert ($fragment) @@ -50,7 +50,7 @@ /* strips all whitespace from a string */ function strip_space ($text) { - return ereg('( |\n|\t|\r)+', '', $text); + return ereg_replace("( |\n|\t|\r)+", '', $text); } function is_allnumbers ($text)