Skip to content

Commit

Permalink
changes for v1.10.6
Browse files Browse the repository at this point in the history
  • Loading branch information
ashnazg committed Aug 22, 2018
1 parent d718e4d commit 052868b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/PEAR.php
Original file line number Diff line number Diff line change
Expand Up @@ -782,7 +782,7 @@ function _PEAR_call_destructors()
$_PEAR_destructor_object_list = array_reverse($_PEAR_destructor_object_list);
}

while (list($k, $objref) = each($_PEAR_destructor_object_list)) {
foreach ($_PEAR_destructor_object_list as $k => $objref) {
$classname = get_class($objref);
while ($classname) {
$destructor = "_$classname";
Expand Down
10 changes: 8 additions & 2 deletions src/System.php
Original file line number Diff line number Diff line change
Expand Up @@ -527,8 +527,14 @@ public static function which($program, $fallback = false)
foreach ($exe_suffixes as $suff) {
foreach ($path_elements as $dir) {
$file = $dir . DIRECTORY_SEPARATOR . $program . $suff;
if (is_executable($file)) {
// It's possible to run a .bat on Windows that is_executable
// would return false for. The is_executable check is meaningless...
if (OS_WINDOWS) {
return $file;
} else {
if (is_executable($file)) {
return $file;
}
}
}
}
Expand Down Expand Up @@ -619,4 +625,4 @@ public static function find($args)
}
return $files;
}
}
}

0 comments on commit 052868b

Please sign in to comment.