Browse Source

fix patch for PHP 7.0

Maurits van der Schee 3 years ago
parent
commit
4f2a8ec8b7
1 changed files with 1 additions and 0 deletions
  1. 1
    0
      patch.php

+ 1
- 0
patch.php View File

23
             }
23
             }
24
             $patched = $original = file_get_contents($filename);
24
             $patched = $original = file_get_contents($filename);
25
             $patched = preg_replace('/\):\s*(\?[a-zA-Z]+|void)\s*\n/', ") /*:$1*/\n", $patched);
25
             $patched = preg_replace('/\):\s*(\?[a-zA-Z]+|void)\s*\n/', ") /*:$1*/\n", $patched);
26
+            $patched = preg_replace('/([\(,])\s*(\?[a-zA-Z]+|void)\s+\$/', "$1 /*$2*/ \$", $patched);
26
             $patched = preg_replace('/(private|public|protected) const/', "/*$1*/ const", $patched);
27
             $patched = preg_replace('/(private|public|protected) const/', "/*$1*/ const", $patched);
27
             if ($patched && $patched != $original) {
28
             if ($patched && $patched != $original) {
28
                 file_put_contents($filename, $patched);
29
                 file_put_contents($filename, $patched);

Loading…
Cancel
Save