Skip to content

Commit 5206086

Browse files
committed
bug #16182 [Process] Workaround buggy PHP warning (cbj4074)
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
2 parents 2406cc7 + b1bd093 commit 5206086

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Symfony/Component/Process/ExecutableFinder.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ public function find($name, $default = null, array $extraDirs = array())
5656
$searchPath = explode(PATH_SEPARATOR, ini_get('open_basedir'));
5757
$dirs = array();
5858
foreach ($searchPath as $path) {
59-
if (is_dir($path)) {
59+
// Silencing against https://bugs.php.net/69240
60+
if (@is_dir($path)) {
6061
$dirs[] = $path;
6162
} else {
6263
if (basename($path) == $name && is_executable($path)) {

0 commit comments

Comments
 (0)