From 68a535905a1a45108d0a11ca1c8a0b78b50cddba Mon Sep 17 00:00:00 2001
From: Michael Hamann <michael@content-space.de>
Date: Tue, 30 Nov 2010 18:37:04 +0100
Subject: [PATCH] Allow spaces in numeric configuration values

---
 lib/plugins/config/settings/config.class.php | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/lib/plugins/config/settings/config.class.php b/lib/plugins/config/settings/config.class.php
index 252bc79a9..887f373bd 100644
--- a/lib/plugins/config/settings/config.class.php
+++ b/lib/plugins/config/settings/config.class.php
@@ -616,8 +616,7 @@ if (!class_exists('setting_numeric')) {
     // This allows for many PHP syntax errors...
     // var $_pattern = '/^[-+\/*0-9 ]*$/';
     // much more restrictive, but should eliminate syntax errors.
-    var $_pattern = '/^[-]?[0-9]+(?:[-+*][0-9]+)*$/';
-    //FIXME - make the numeric error checking better.
+    var $_pattern = '/^[-+]? *[0-9]+ *(?:[-+*] *[0-9]+ *)*$/';
     var $_min = null;
     var $_max = null;
 
-- 
GitLab