From d0c7ba52572f863a3627f9ef4054935055131ac3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roland=20H=C3=A4der?= Date: Sun, 13 May 2018 22:50:09 +0200 Subject: [PATCH] Fixed parser error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- include/text.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/text.php b/include/text.php index c9ab0b9430..3f66d379c9 100644 --- a/include/text.php +++ b/include/text.php @@ -1978,18 +1978,22 @@ function protect_sprintf($s) { return str_replace('%', '%%', $s); } - +/// @TODO Rewrite this function is_a_date_arg($s) { $i = intval($s); + if ($i > 1900) { $y = date('Y'); + if ($i <= $y + 1 && strpos($s, '-') == 4) { $m = intval(substr($s, 5)); + if ($m > 0 && $m <= 12) { return true; } } } + return false; }