I was editing WordPress and the error message below came out.
" Notice: fread(): read of 8192 bytes failed with errno=21 Is a directory in /home/c7006248/public_html/ondine199918.com/wp-includes/functions.php on line 6574"
The code is as follows.
*/
function get_file_data( $file, $default_headers, $context = '' ) {
// We don't need to write to the file, so just open for reading.
$fp = fopen( $file, 'r' );
if ( $fp ) {
// Pull only the first 8 KB of the file in.
$file_data = fread( $fp, 8 * KB_IN_BYTES );
// PHP will close file handle, but we are good citizens.
fclose( $fp );
} else {
$file_data = '';
}
Does anyone have any idea of a potential fix for that issue?
I would be more than grateful if you help me with a fix. Thanks in advance! :)
Hitomi
For the additional information. The error location I'm getting is " Notice: fread(): read of 8192 bytes failed with errno=21 Is a directory in /home/c7006248/public_html/ondine199918.com/wp-includes/functions.php on line 6574 "
And the line 6574 is
$file_data = fread( $fp, 8 * KB_IN_BYTES );
from the extracted code above.
Sorry for the incomplete information.