Aggiornato Composer
This commit is contained in:
7
vendor/sebastian/environment/ChangeLog.md
vendored
7
vendor/sebastian/environment/ChangeLog.md
vendored
@@ -2,6 +2,12 @@
|
||||
|
||||
All notable changes in `sebastianbergmann/environment` are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles.
|
||||
|
||||
## [5.1.5] - 2023-02-03
|
||||
|
||||
### Fixed
|
||||
|
||||
* [#59](https://github.com/sebastianbergmann/environment/issues/59): Wrong usage of `stream_isatty()`, `fstat()` used without checking whether the function is available
|
||||
|
||||
## [5.1.4] - 2022-04-03
|
||||
|
||||
### Fixed
|
||||
@@ -151,6 +157,7 @@ All notable changes in `sebastianbergmann/environment` are documented in this fi
|
||||
|
||||
* This component is no longer supported on PHP 5.6
|
||||
|
||||
[5.1.5]: https://github.com/sebastianbergmann/environment/compare/5.1.4...5.1.5
|
||||
[5.1.4]: https://github.com/sebastianbergmann/environment/compare/5.1.3...5.1.4
|
||||
[5.1.3]: https://github.com/sebastianbergmann/environment/compare/5.1.2...5.1.3
|
||||
[5.1.2]: https://github.com/sebastianbergmann/environment/compare/5.1.1...5.1.2
|
||||
|
||||
6
vendor/sebastian/environment/src/Console.php
vendored
6
vendor/sebastian/environment/src/Console.php
vendored
@@ -105,16 +105,14 @@ final class Console
|
||||
public function isInteractive($fileDescriptor = self::STDOUT): bool
|
||||
{
|
||||
if (is_resource($fileDescriptor)) {
|
||||
// These functions require a descriptor that is a real resource, not a numeric ID of it
|
||||
if (function_exists('stream_isatty') && @stream_isatty($fileDescriptor)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Check if formatted mode is S_IFCHR
|
||||
if (function_exists('fstat') && @stream_isatty($fileDescriptor)) {
|
||||
if (function_exists('fstat')) {
|
||||
$stat = @fstat(STDOUT);
|
||||
|
||||
return $stat ? 0020000 === ($stat['mode'] & 0170000) : false;
|
||||
return $stat && 0020000 === ($stat['mode'] & 0170000);
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user