]> git.mxchange.org Git - friendica.git/commitdiff
Fix possible false return type in PHP 7.4
authorArt4 <art4@wlabs.de>
Thu, 13 Mar 2025 12:49:09 +0000 (12:49 +0000)
committerArt4 <art4@wlabs.de>
Thu, 13 Mar 2025 12:49:09 +0000 (12:49 +0000)
src/Console/PoToPhp.php

index ec5c050e705bce7e570de810a837bd43e9b9ccbf..a99cd6e8064c464b30292a0f2b52030d102373ab 100644 (file)
@@ -175,11 +175,11 @@ HELP;
         * @param string $string
         * @param array|string $node
         */
-       private static function parse(string $string, &$node = [])
+       private static function parse(string $string, &$node)
        {
                // Removes extra outward parentheses
                if (strpos($string, '(') === 0 && strrpos($string, ')') === strlen($string) - 1) {
-                       $string = substr($string, 1, -1);
+                       $string = (string) substr($string, 1, -1);
                }
 
                $q = strpos($string, '?');