From: [EMAIL PROTECTED] Operating system: Windows, Linux PHP version: 6CVS-2008-11-26 (snap) PHP Bug Type: Filesystem function related Bug description: Return values differ from 5.3 and are also inconsistent
Description: ------------ The following tests were all ported from 5.3 and behave differently on 6.0. There are two issues with the test results. Firstly, they return different values from 5.3 - this may not be a problem if 6.0 is actually making them more consistent. However within a given function some invalid arguments return bool(false) and other examples return NULL. Perhaps we should be consistent and always return one or the other? It would make documenting the function easier anyway [:o) ext/standard/tests/file/007_error.phpt ext/standard/tests/file/fgetc_variation2.phpt ext/standard/tests/file/fgets_error.phpt ext/standard/tests/file/fgets_variation2.phpt ext/standard/tests/file/fpassthru_error.phpt ext/standard/tests/file/fpassthru_variation1.phpt ext/standard/tests/file/fseek_ftell_rewind_error1.phpt ext/standard/tests/file/fseek_ftell_rewind_error2.phpt ext/standard/tests/file/fseek_ftell_rewind_error3.phpt ext/standard/tests/file/fseek_variation1.phpt ext/standard/tests/file/fseek_variation2.phpt ext/standard/tests/file/fread_error.phpt ext/standard/tests/file/fwrite_error.phpt ext/standard/tests/file/pclose_variation1.phpt ext/standard/tests/file/umask_variation3 Reproduce code: --------------- Here is an example using fopen() - notice the different return values: *** Testing error conditions for fopen(), fclsoe() & feof() *** Warning: fopen() expects at least 2 parameters, 1 given in %s on line %d bool(false) Warning: fopen() expects at least 2 parameters, 0 given in %s on line %d bool(false) Warning: fclose(): %d is not a valid stream resource in %s on line %d bool(false) Warning: fclose() expects parameter 1 to be resource, Unicode string given in %s on line %d NULL Warning: fclose() expects exactly 1 parameter, 0 given in %s on line %d NULL -- Edit bug report at http://bugs.php.net/?id=46688&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=46688&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=46688&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=46688&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=46688&r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=46688&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=46688&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=46688&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=46688&r=needscript Try newer version: http://bugs.php.net/fix.php?id=46688&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=46688&r=support Expected behavior: http://bugs.php.net/fix.php?id=46688&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=46688&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=46688&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=46688&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=46688&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=46688&r=dst IIS Stability: http://bugs.php.net/fix.php?id=46688&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=46688&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=46688&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=46688&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=46688&r=mysqlcfg