bug #21613 [Process] Permit empty suffix on Windows (Bilge)

This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes #21613).

Discussion
----------

[Process] Permit empty suffix on Windows

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

It is a fallacy to assume the blank suffix is not applicable on Windows systems, especially in a world where we often emulate Linux systems with solutions such as CYGWIN, MinGW and MSYS.

Commits
-------

412db4ca51 Permit empty suffix on Windows
This commit is contained in:
Fabien Potencier 2017-02-16 04:33:38 -08:00
commit 1901432c57

View File

@ -75,7 +75,7 @@ class ExecutableFinder
$suffixes = array('');
if ('\\' === DIRECTORY_SEPARATOR) {
$pathExt = getenv('PATHEXT');
$suffixes = $pathExt ? explode(PATH_SEPARATOR, $pathExt) : $this->suffixes;
$suffixes = array_merge($suffixes, $pathExt ? explode(PATH_SEPARATOR, $pathExt) : $this->suffixes);
}
foreach ($suffixes as $suffix) {
foreach ($dirs as $dir) {