|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #75203 FILE_USE_INCLUDE_PATH: INT instead BOOL.
Submitted: 2017-09-13 17:11 UTC Modified: 2017-09-19 15:05 UTC
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: saymongcsw at gmail dot com Assigned: cmb (profile)
Status: Closed Package: Filesystem function related
PHP Version: 7.1.9 OS: any
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: saymongcsw at gmail dot com
New email:
PHP Version: OS:


 [2017-09-13 17:11 UTC] saymongcsw at gmail dot com
FILE_USE_INCLUDE_PATH returns 1 instead true.
what causes error with strict_types=1 in file_get_contents().

Test script:
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


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2017-09-13 23:09 UTC]
-Status: Open +Status: Verified
 [2017-09-13 23:09 UTC]
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] <>
 [2017-09-13 23:12 UTC]
-Package: *General Issues +Package: Filesystem function related
 [2017-09-18 18:56 UTC] saymongcsw at gmail dot com another example.
 [2017-09-19 14:32 UTC]
-Assigned To: +Assigned To: cmb
 [2017-09-19 14:32 UTC]
Actually, we can't change FILE_USE_INCLUDE_PATH to bool, because it is an
accepted flag for the $flags parameter of file_put_contents() (which is an int).
Changing the $use_include_path parameter of file_get_contents() to int is also
not an option. Therefore the documentation will have to be fixed.
 [2017-09-19 14:32 UTC]
-Type: Bug +Type: Documentation Problem
 [2017-09-19 15:04 UTC]
Automatic comment from SVN on behalf of cmb
Log: Fix #75203: FILE_USE_INCLUDE_PATH: INT instead BOOL
 [2017-09-19 15:05 UTC]
-Status: Verified +Status: Closed
 [2017-09-19 15:05 UTC]
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.
 [2020-02-07 06:06 UTC]
Automatic comment on behalf of cmb
Log: Fix #75203: FILE_USE_INCLUDE_PATH: INT instead BOOL
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Jul 25 04:01:28 2024 UTC