minor #19535 Workaround another buggy PHP warning (cbj4074)

This PR was merged into the 2.7 branch.

Discussion
----------

Workaround another buggy PHP warning

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

Added error-suppression to the `is_executable($path)` call, too, per the bug noted just above.

The cited issue manifests as such without it:

```
ErrorException in ExecutableFinder.php line 63:
is_executable(): open_basedir restriction in effect. File(/usr/share/php) is not within the allowed path(s): (/usr/share/php:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/usr/local/zend/var/zray/extensions:/usr/local/zend/share:/usr/local/zend/var/plugins)
```

Commits
-------

4348f4b Workaround another buggy PHP warning
This commit is contained in:
Fabien Potencier 2016-08-06 08:16:23 -07:00
commit cd3d04eb74
1 changed files with 1 additions and 1 deletions

View File

@ -60,7 +60,7 @@ class ExecutableFinder
if (@is_dir($path)) {
$dirs[] = $path;
} else {
if (basename($path) == $name && is_executable($path)) {
if (basename($path) == $name && @is_executable($path)) {
return $path;
}
}