php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #37266 scandir() triggers double warning
Submitted: 2006-05-01 17:21 UTC Modified: 2006-05-02 13:34 UTC
From: crescentfreshpot at yahoo dot com Assigned:
Status: Not a bug Package: Directory function related
PHP Version: 5.1.3RC2 OS: Win XP
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: crescentfreshpot at yahoo dot com
New email:
PHP Version: OS:

 

 [2006-05-01 17:21 UTC] crescentfreshpot at yahoo dot com
Description:
------------
scandir() triggers two warnings on failure. 

(the first might be triggered in /main/streams/streams.c somewhere around line 1722, the second in /ext/standard/dir.c on line 487)

Reproduce code:
---------------
<?php
error_reporting(E_ALL);
scandir('foo');
?>

Expected result:
----------------
Warning: scandir(foo): failed to open dir: Invalid argument in xxx on line 3


Actual result:
--------------
Warning: scandir(foo): failed to open dir: Invalid argument in xxx on line 3

Warning: scandir(): (errno 22): Invalid argument in xxx on line 3

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-05-02 13:34 UTC] iliaa@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

One is a PHP error another is a system error relayed by PHP.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Oct 27 16:01:27 2024 UTC