]> git.mxchange.org Git - friendica.git/commitdiff
Fixed parser error
authorRoland Häder <roland@mxchange.org>
Sun, 13 May 2018 20:50:09 +0000 (22:50 +0200)
committerRoland Häder <roland@mxchange.org>
Mon, 14 May 2018 20:50:21 +0000 (22:50 +0200)
Signed-off-by: Roland Häder <roland@mxchange.org>
include/text.php

index c9ab0b94305a8fc2e02d698e11e5be1045459a7e..3f66d379c9666e2f5162fccf60ca21ef070199fa 100644 (file)
@@ -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;
 }