Bug #79805 [NEW]: sapi_windows_vt100_support throws TypeError when not able to analyze the stream

From: Date: Tue, 07 Jul 2020 15:14:37 +0000
Subject: Bug #79805 [NEW]: sapi_windows_vt100_support throws TypeError when not able to analyze the stream
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-227867@lists.php.net to get a copy of this message
From: ondrej at mirtes dot cz Operating system: Windows PHP version: 8.0.0alpha1 Package: Streams related Bug Type: Bug Bug description:sapi_windows_vt100_support throws TypeError when not able to analyze the stream Description: ------------ Hi, Symfony Console contains this code: if (\DIRECTORY_SEPARATOR === '\\') { return (\function_exists('sapi_windows_vt100_support') && @sapi_windows_vt100_support($this->stream)) || false !== getenv('ANSICON') || 'ON' === getenv('ConEmuANSI') || 'xterm' === getenv('TERM'); } (https://github.com/symfony/symfony/blob/104a8f8cc99d49f15a67c3014e644740bc4d41d9/src/Symfony/Component/Console/Output/StreamOutput.php#L105-L111) The @ is there because on PHP 7.x, the function throws this warning: E_WARNING: sapi_windows_vt100_support() was not able to analyze the specified stream In PHP 8, this is now a TypeError: TypeError: sapi_windows_vt100_support() was not able to analyze the specified stream I'm opening this bug to make sure that this changed is done on purpose (or not) so that the code in Symfony can be fixed. -- Edit bug report at https://bugs.php.net/bug.php?id=79805&edit=1 -- Fix committed: https://bugs.php.net/fix.php?id=79805&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=79805&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=79805&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=79805&r=needscript Try newer version: https://bugs.php.net/fix.php?id=79805&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=79805&r=support Expected behavior: https://bugs.php.net/fix.php?id=79805&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=79805&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=79805&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=79805&r=globals PHP version support discontinued: https://bugs.php.net/fix.php?id=79805&r=phptooold Daylight Savings: https://bugs.php.net/fix.php?id=79805&r=dst IIS Stability: https://bugs.php.net/fix.php?id=79805&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=79805&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=79805&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=79805&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=79805&r=mysqlcfg

« previous php.bugs (#227867) next »