[wp-trac] [WordPress Trac] #32561: Warning: fread() expects parameter 1 to be resource, boolean given in get_file_data()
WordPress Trac
noreply at wordpress.org
Fri Jun 26 04:30:06 UTC 2015
#32561: Warning: fread() expects parameter 1 to be resource, boolean given in
get_file_data()
--------------------------+------------------------------
Reporter: SpYdR | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 4.1.3
Severity: normal | Resolution:
Keywords: close | Focuses:
--------------------------+------------------------------
Changes (by dd32):
* keywords: => close
Comment:
Actually, further to this, the error is actually several:
{{{
Warning: fopen(/file/doesnt/exist): failed to open stream: No such file or
directory in /src/wp-includes/functions.php on line 4258
Warning: fread() expects parameter 1 to be resource, boolean given in /src
/wp-includes/functions.php on line 4261
Warning: fclose() expects parameter 1 to be resource, boolean given in
/src/wp-includes/functions.php on line 4264
}}}
we could prefix it with a `file_exists()` or `is_readable()`, but i still
hold that the calling function should run that.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/32561#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list