Doc #75485 [NEW]: rewinddir incorrect return type
| From: | erik at evanv dot nl | Date: | Fri, 03 Nov 2017 16:45:41 +0000 |
| Subject: | Doc #75485 [NEW]: rewinddir incorrect return type | ||
| Groups: | php.doc.bugs | ||
| Request: | Send a blank email to doc-bugs+get-15211@lists.php.net to get a copy of this message | ||
From: erik at evanv dot nl
Operating system: Linux
PHP version: 7.1.11
Package: Documentation problem
Bug Type: Documentation Problem
Bug description:rewinddir incorrect return type
Description:
------------
---
From manual page: http://www.php.net/function.rewinddir
---
return type is specified as void but it is false in case of errors:
php > var_dump(rewinddir(fopen('/tmp/', 'r')));
PHP Warning: rewinddir(): 25 is not a valid Directory resource in php
shell code on line 1
PHP Stack trace:
PHP 1. {main}() php shell code:0
PHP 2. rewinddir() php shell code:1
php shell code:1:
bool(false)
Test script:
---------------
var_dump(rewinddir(fopen('/tmp/', 'r')));
--
Edit bug report at https://bugs.php.net/bug.php?id=75485&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=75485&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=75485&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=75485&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=75485&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=75485&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=75485&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=75485&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=75485&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=75485&r=support
Expected behavior: https://bugs.php.net/fix.php?id=75485&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=75485&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=75485&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=75485&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=75485&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=75485&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=75485&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=75485&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=75485&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=75485&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=75485&r=mysqlcfg