Bug #78386 [PATCH]: fstat mode has unexpected value on PHP 7.4
| From: | cmb@php.net | Date: | Fri, 09 Aug 2019 09:16:08 +0000 |
| Subject: | Bug #78386 [PATCH]: fstat mode has unexpected value on PHP 7.4 | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-222155@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=78386&edit=1
ID: 78386
Patch added by: cmb@php.net
Reported by: theodorejb at outlook dot com
Summary: fstat mode has unexpected value on PHP 7.4
Status: Verified
Type: Bug
Package: Filesystem function related
Operating System: Windows 10
PHP Version: 7.4.0beta2
Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
The following pull request has been associated:
Patch Name: Fix #78386: fstat mode has unexpected value on PHP 7.4
On GitHub: https://github.com/php/php-src/pull/4498
Patch: https://github.com/php/php-src/pull/4498.patch
Previous Comments:
------------------------------------------------------------------------
[2019-08-09 08:19:10] cmb@php.net
Thanks for reporting!
------------------------------------------------------------------------
[2019-08-08 20:01:22] theodorejb at outlook dot com
Description:
------------
PHP 7.4 beta 2 returns a different fstat mode value for file pointers than PHP 7.3. This is causing
functionality in Slim-Psr7 to break.
Test script:
---------------
<?php
$handle = popen('echo 12', 'r');
$stats = fstat($handle);
var_dump($stats['mode']); // PHP 7.3 prints 4096, PHP 7.4 beta 2 prints 33206
$isPipe = ($stats['mode'] & 0010000) !== 0;
var_dump($isPipe); // PHP 7.3 prints true, PHP 7.4 beta 2 prints false
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=78386&edit=1