Skip to content

Commit

Permalink
$filename contains the full path.
Browse files Browse the repository at this point in the history
  • Loading branch information
yunosh committed Jun 27, 2016
1 parent da8a07c commit 76a6385
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion git-hooks/pre-receive.d/php-syntax-check
Expand Up @@ -44,7 +44,7 @@ function syntaxCheckFile($blob, $filename)
$needle = '/(\.php)$/';
if (preg_match($needle, $filename) &&
// @todo Skip until updated to PHP 5.6.
$filename != 'autoload_static.php') {
strpos($filename, 'composer/autoload_static.php') === false) {
$dummy = array();
exec("git show $blob | /usr/bin/env php -l", $output, $returnCode);
if ($returnCode != 0) {
Expand Down

0 comments on commit 76a6385

Please sign in to comment.