ID:               46454
 User updated by:  hostmaster at uuism dot net
 Reported By:      hostmaster at uuism dot net
-Status:           Open
+Status:           Closed
 Bug Type:         Directory function related
 Operating System: Fedora Core 4
 PHP Version:      5.2CVS-2008-11-01 (snap)
 New Comment:

the test passed with php5.2-200811022130, so i assume that you fixed
the problem.

thanks

jim


Previous Comments:
------------------------------------------------------------------------

[2008-11-01 21:15:15] hostmaster at uuism dot net

Jani,

Yes, the test is failing.  I get slightly different wording for the
Warning than is expected by the test.  It's only a bug in the test
script, not a bug in PHP.

Is the non-existent directory Warning produced by the operating system
and just passed along by PHP?  That would explain why the test results
fail for different operating systems.

Thanks for being patient with my inexperienced bug reports.

Jim

------------------------------------------------------------------------

[2008-11-01 20:43:13] [EMAIL PROTECTED]

What's the bug here? A test not passing for you or what? FYI, it does 
not fail for me on Fedora 8..

------------------------------------------------------------------------

[2008-11-01 16:17:35] hostmaster at uuism dot net

Description:
------------
rmdir() on non-existent directory produces the response "Warning:
rmdir(temp): Not a directory" that is different than test script
mkdir_rmdir_error.phpt expects: "Warning: rmdir(temp): No such file or
directory"

This is the last statement in the test script.

Jim


Reproduce code:
---------------
<?php
/*  Prototype: bool mkdir ( string $pathname [, int $mode [, bool
$recursive [, resource $context]]] );
    Description: Makes directory

    Prototype: bool rmdir ( string $dirname [, resource $context] );
    Description: Removes directory
*/

echo "*** Testing mkdir(): error conditions ***\n";
var_dump( mkdir() );  // args < expected
var_dump( mkdir(1, 2, 3, 4, 5) );  // args > expected
var_dump( mkdir("testdir", 0777, false, $context, "test") );  // args >
expected

echo "\n*** Testing rmdir(): error conditions ***\n";
var_dump( rmdir() );  // args < expected
var_dump( rmdir(1, 2, 3) );  // args > expected
var_dump( rmdir("testdir", $context, "test") );  // args > expected

echo "\n*** Testing rmdir() on non-existent directory ***\n";
var_dump( rmdir("temp") );

echo "Done\n";
?>


Expected result:
----------------
*** Testing mkdir(): error conditions ***

Warning: mkdir() expects at least 1 parameter, 0 given in %s on line
%d
bool(false)

Warning: mkdir() expects at most 4 parameters, 5 given in %s on line
%d
bool(false)

Notice: Undefined variable: context in %s on line %d

Warning: mkdir() expects at most 4 parameters, 5 given in %s on line
%d
bool(false)

*** Testing rmdir(): error conditions ***

Warning: rmdir() expects at least 1 parameter, 0 given in %s on line
%d
bool(false)

Warning: rmdir() expects at most 2 parameters, 3 given in %s on line
%d
bool(false)

Notice: Undefined variable: context in %s on line %d

Warning: rmdir() expects at most 2 parameters, 3 given in %s on line
%d
bool(false)

*** Testing rmdir() on non-existent directory ***

Warning: rmdir(temp): No such file or directory in %s on line %d
bool(false)
Done


Actual result:
--------------
*** Testing mkdir(): error conditions ***

Warning: mkdir() expects at least 1 parameter, 0 given in
/usr/local/src/php5.2-200810312330/ext/standard/tests/file/mkdir_rmdir_error.php
on line 10
bool(false)

Warning: mkdir() expects at most 4 parameters, 5 given in
/usr/local/src/php5.2-200810312330/ext/standard/tests/file/mkdir_rmdir_error.php
on line 11
bool(false)

Notice: Undefined variable: context in
/usr/local/src/php5.2-200810312330/ext/standard/tests/file/mkdir_rmdir_error.php
on line 12

Warning: mkdir() expects at most 4 parameters, 5 given in
/usr/local/src/php5.2-200810312330/ext/standard/tests/file/mkdir_rmdir_error.php
on line 12
bool(false)

*** Testing rmdir(): error conditions ***

Warning: rmdir() expects at least 1 parameter, 0 given in
/usr/local/src/php5.2-200810312330/ext/standard/tests/file/mkdir_rmdir_error.php
on line 15
bool(false)

Warning: rmdir() expects at most 2 parameters, 3 given in
/usr/local/src/php5.2-200810312330/ext/standard/tests/file/mkdir_rmdir_error.php
on line 16
bool(false)

Notice: Undefined variable: context in
/usr/local/src/php5.2-200810312330/ext/standard/tests/file/mkdir_rmdir_error.php
on line 17

Warning: rmdir() expects at most 2 parameters, 3 given in
/usr/local/src/php5.2-200810312330/ext/standard/tests/file/mkdir_rmdir_error.php
on line 17
bool(false)

*** Testing rmdir() on non-existent directory ***

Warning: rmdir(temp): Not a directory in
/usr/local/src/php5.2-200810312330/ext/standard/tests/file/mkdir_rmdir_error.php
on line 20
bool(false)
Done



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=46454&edit=1

Reply via email to