From b9c038ca63c2413789e123ed4e04bba889b9f830 Mon Sep 17 00:00:00 2001 From: Richard Hillmann Date: Sun, 7 Jan 2018 08:47:59 +0100 Subject: [PATCH] Fix preg_match in guess_type function (#6123) --- program/lib/Roundcube/rcube_config.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/program/lib/Roundcube/rcube_config.php b/program/lib/Roundcube/rcube_config.php index a5f6a4ee5..431b512a3 100644 --- a/program/lib/Roundcube/rcube_config.php +++ b/program/lib/Roundcube/rcube_config.php @@ -109,13 +109,13 @@ class rcube_config // array requires hint to be passed. - if (preg_match('/^[-+]?(\d+(\.\d*)?|\.\d+)([eE][-+]?\d+)?$/', $value) !== false) { + if (preg_match('/^[-+]?(\d+(\.\d*)?|\.\d+)([eE][-+]?\d+)?$/', $value)) { $type = 'double'; } - else if (preg_match('/^\d+$/', $value) !== false) { + else if (preg_match('/^\d+$/', $value)) { $type = 'integer'; } - else if (preg_match('/(t(rue)?)|(f(alse)?)/i', $value) !== false) { + else if (preg_match('/^(t(rue)?)|(f(alse)?)$/i', $value)) { $type = 'boolean'; }