From: Jakub Vrana Date: Wed, 12 Mar 2025 04:03:42 +0000 (+0100) Subject: Compile: Support private static X-Git-Tag: v5.0.5~57 X-Git-Url: https://git.joonet.de/?a=commitdiff_plain;h=5504a617d0fd932f028ee40a053d8e8cc4c894b1;p=adminer.git Compile: Support private static --- diff --git a/compile.php b/compile.php index fda698df..b56c676f 100755 --- a/compile.php +++ b/compile.php @@ -297,13 +297,13 @@ function php_shrink($input) { $doc_comment = true; $token[1] = substr_replace($token[1], "* @version $VERSION\n", -2, 0); } - if (($token[0] == T_VAR || $token[0] == T_PUBLIC || $token[0] == T_PROTECTED || $token[0] == T_PRIVATE) && $tokens[$i+2][1][0] == '$') { - if ($token[0] == T_PUBLIC) { + if ($token[0] == T_VAR || $token[0] == T_PUBLIC || $token[0] == T_PROTECTED || $token[0] == T_PRIVATE) { + if ($token[0] == T_PUBLIC && $tokens[$i+2][1][0] == '$') { $token[1] = 'var'; } $shortening = false; } elseif (!$shortening) { - if ($token[1] == ';') { + if ($token[1] == ';' || $token[0] == T_FUNCTION) { $shortening = true; } } elseif ($token[0] == T_ECHO) {