Bug #79060 [Opn]: fgets errno=22
| From: | namiltd at yahoo dot com | Date: | Fri, 03 Jan 2020 13:24:07 +0000 |
| Subject: | Bug #79060 [Opn]: fgets errno=22 | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-224687@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=79060&edit=1
ID: 79060
User updated by: namiltd at yahoo dot com
Reported by: namiltd at yahoo dot com
Summary: fgets errno=22
Status: Open
Type: Bug
Package: *General Issues
Operating System: Debian GNU/Linux 9
PHP Version: 7.4.1
Block user comment: N
Private report: N
New Comment:
E-mail change
Previous Comments:
------------------------------------------------------------------------
[2020-01-03 13:18:57] namiltd at yahoo dot com
Description:
------------
Unexpected notice: Notice: fgets(): read of 8192 bytes failed with errno=22 Invalid argument in
/home/www/test.php on line 3
Interestingly, the buffer is 2048 but indicates 8192
Test script:
---------------
<?php
$file = fopen("/sys/class/net/lo/speed","r");
echo ">".fgets($file, 2048)."<";
fclose($file);
?>
Expected result:
----------------
><
Actual result:
--------------
Notice: fgets(): read of 8192 bytes failed with errno=22 Invalid argument in /home/www/test.php on
line 3
><
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=79060&edit=1