Skip to content

Commit

Permalink
bug #16182 [Process] Workaround buggy PHP warning (cbj4074)
Browse files Browse the repository at this point in the history
This PR was submitted for the 2.8 branch but it was merged into the 2.3 branch instead (closes #16182).

Discussion
----------

[Process] Workaround buggy PHP warning

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

This temporary workaround is intended to address an uncaught exception that may occur, until https://bugs.php.net/bug.php?id=69240 is fixed.

Obviously the `@` operator is another option, but I'm erring towards the notion that the Symfony authors/maintainers may wish to implement more elegant exception-handling logic than simply using `@`.

Commits
-------

b1bd093 [Process] Workaround buggy PHP warning
  • Loading branch information
Tobion committed Oct 9, 2015
2 parents 2406cc7 + b1bd093 commit 5206086
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Symfony/Component/Process/ExecutableFinder.php
Expand Up @@ -56,7 +56,8 @@ public function find($name, $default = null, array $extraDirs = array())
$searchPath = explode(PATH_SEPARATOR, ini_get('open_basedir'));
$dirs = array();
foreach ($searchPath as $path) {
if (is_dir($path)) {
// Silencing against https://bugs.php.net/69240
if (@is_dir($path)) {
$dirs[] = $path;
} else {
if (basename($path) == $name && is_executable($path)) {
Expand Down

0 comments on commit 5206086

Please sign in to comment.