Bug #75203 [Ver]: FILE_USE_INCLUDE_PATH: INT instead BOOL.
| From: | saymongcsw at gmail dot com | Date: | Mon, 18 Sep 2017 18:56:43 +0000 |
| Subject: | Bug #75203 [Ver]: FILE_USE_INCLUDE_PATH: INT instead BOOL. | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-211233@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=75203&edit=1
ID: 75203
User updated by: saymongcsw at gmail dot com
Reported by: saymongcsw at gmail dot com
Summary: FILE_USE_INCLUDE_PATH: INT instead BOOL.
Status: Verified
Type: Bug
Package: Filesystem function related
Operating System: any
PHP Version: 7.1.9
Block user comment: N
Private report: N
New Comment:
https://3v4l.org/2Uvu1 another example.
Previous Comments:
------------------------------------------------------------------------
[2017-09-13 23:09:53] cmb@php.net
To fix this FILE_USE_INCLUDE_PATH would have to be registered via
REGISTER_BOOL_CONSTANT[1]. I'm not sure about the potential BC
break, though.
[1] <https://github.com/php/php-src/blob/PHP-7.0.23/ext/standard/file.c#L302>
------------------------------------------------------------------------
[2017-09-13 17:11:19] saymongcsw at gmail dot com
Description:
------------
FILE_USE_INCLUDE_PATH returns 1 instead true. https://3v4l.org/UqBVt
what causes error with strict_types=1 in file_get_contents().
Test script:
---------------
<?php
declare(strict_types = 1);
file_get_contents('example.txt', FILE_USE_INCLUDE_PATH);
Expected result:
----------------
load contents successfully.
Actual result:
--------------
file_get_contents() expects parameter 2 to be boolean, integer given
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=75203&edit=1