From c648ba847bdf8e6b2ca522929003cf723b09b649 Mon Sep 17 00:00:00 2001 From: hickert Date: Mon, 12 Nov 2007 06:51:12 +0000 Subject: [PATCH] Fixed error messages in servnfs: PHP error: preg_match(): Compilation failed: range out of order in character class at offset 2 git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@7760 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/systems/class_servNfs.inc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/admin/systems/class_servNfs.inc b/plugins/admin/systems/class_servNfs.inc index 9353b955d..f8c90b1d5 100644 --- a/plugins/admin/systems/class_servNfs.inc +++ b/plugins/admin/systems/class_servNfs.inc @@ -185,11 +185,11 @@ class servnfs extends plugin } } - if(preg_match("/^[a-z0-9\._äüö\+ -]*$/ui",$this->description)){ + if(!empty($this->description) && preg_match("/^[^a-z0-9\._äüö\+ -]*$/ui",$this->description)){ $message[]=_("Description contains invalid characters."); } - if(preg_match("/^[a-z0-9\._äüö\+ -]*$/ui",$this->volume)){ + if(!empty($this->volume) && preg_match("/^[^a-z0-9\._äüö\+ -]*$/ui",$this->volume)){ $message[]=_("Volume contains invalid characters."); } @@ -197,7 +197,7 @@ class servnfs extends plugin $message[]=_("Path contains invalid characters."); } - if(preg_match("/^[a-z0-9\._äüö,=\+- ]*$/ui",$this->option)){ + if(!empty($this->option) && preg_match("/^[^a-z0-9\._äüö,=\+ -]*$/ui",$this->option)){ $message[]=_("Option contains invalid characters."); } -- 2.30.2