Bug #71849 [NEW]: file_get_contents returns undocumented type
| From: | hanskrentel at yahoo dot de | Date: | Fri, 18 Mar 2016 00:14:00 +0000 |
| Subject: | Bug #71849 [NEW]: file_get_contents returns undocumented type | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-199909@lists.php.net to get a copy of this message | ||
From: hanskrentel at yahoo dot de
Operating system: Linux
PHP version: 7.0.4
Package: *General Issues
Bug Type: Bug
Bug description:file_get_contents returns undocumented type
Description:
------------
I managed to make file_get_contents() return NULL which is undocumented
(string and FALSE is documented).
Technically the case ("\0" as filename) triggers a warning so might not
construe an error, but actually smells a lot like an error finally and
should be FALSE.
This would also reduce handling return value logic.
So far it's merely unnoticed as undocumented, no idea if it's a
technical difficulty to fix or just an oversight.
As this is NUL byte related this might make underlying problems
visible.
As I'm undecided, I filed it as bug. It could be a documentation problem
or security issue. Also a change request. As it could be all three, I
filed it as bug which is undefined as well. HTH
--
Edit bug report at https://bugs.php.net/bug.php?id=71849&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=71849&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=71849&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=71849&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=71849&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=71849&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=71849&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=71849&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=71849&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=71849&r=support
Expected behavior: https://bugs.php.net/fix.php?id=71849&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=71849&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=71849&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=71849&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=71849&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=71849&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=71849&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=71849&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=71849&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=71849&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=71849&r=mysqlcfg