cvs: php-src /ext/standard file.c /ext/standard/tests/assert assert_basic2.phpt /ext/standard/tests/file copy_variation12.phpt copy_variation13.phpt

From: Date: Mon, 13 Aug 2007 08:14:04 +0000
Subject: cvs: php-src /ext/standard file.c /ext/standard/tests/assert assert_basic2.phpt /ext/standard/tests/file copy_variation12.phpt copy_variation13.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-45876@lists.php.net to get a copy of this message
jani Mon Aug 13 08:14:04 2007 UTC Modified files: /php-src/ext/standard file.c /php-src/ext/standard/tests/assert assert_basic2.phpt /php-src/ext/standard/tests/file copy_variation12.phpt copy_variation13.phpt Log: MFB: Fix tests + directory check inside copy() function http://cvs.php.net/viewvc.cgi/php-src/ext/standard/file.c?r1=1.497&r2=1.498&diff_format=u Index: php-src/ext/standard/file.c diff -u php-src/ext/standard/file.c:1.497 php-src/ext/standard/file.c:1.498 --- php-src/ext/standard/file.c:1.497 Sun Aug 12 02:00:03 2007 +++ php-src/ext/standard/file.c Mon Aug 13 08:14:03 2007 @@ -21,7 +21,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: file.c,v 1.497 2007/08/12 02:00:03 hirokawa Exp $ */ +/* $Id: file.c,v 1.498 2007/08/13 08:14:03 jani Exp $ */ /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */ @@ -1903,13 +1903,13 @@ default: /* failed to stat file, does not exist? */ return ret; } - if (php_stream_stat_path_ex(dest, PHP_STREAM_URL_STAT_QUIET, &dest_s, NULL) != 0) { - goto safe_to_copy; - } if (S_ISDIR(src_s.sb.st_mode)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "The first argument to copy() function cannot be a directory"); return FAILURE; } + if (php_stream_stat_path_ex(dest, PHP_STREAM_URL_STAT_QUIET, &dest_s, NULL) != 0) { + goto safe_to_copy; + } if (!src_s.sb.st_ino || !dest_s.sb.st_ino) { goto no_stat; } http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/assert/assert_basic2.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/standard/tests/assert/assert_basic2.phpt diff -u php-src/ext/standard/tests/assert/assert_basic2.phpt:1.1 php-src/ext/standard/tests/assert/assert_basic2.phpt:1.2 --- php-src/ext/standard/tests/assert/assert_basic2.phpt:1.1 Fri Jul 13 14:57:32 2007 +++ php-src/ext/standard/tests/assert/assert_basic2.phpt Mon Aug 13 08:14:03 2007 @@ -1,5 +1,5 @@ --TEST-- -assert() basic - correct call back values before and after assert. +assert() - basic - correct call back values before and after assert. --INI-- assert.active = 1 assert.warning = 1 http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/copy_variation12.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/standard/tests/file/copy_variation12.phpt diff -u php-src/ext/standard/tests/file/copy_variation12.phpt:1.2 php-src/ext/standard/tests/file/copy_variation12.phpt:1.3 --- php-src/ext/standard/tests/file/copy_variation12.phpt:1.2 Fri Aug 10 02:58:50 2007 +++ php-src/ext/standard/tests/file/copy_variation12.phpt Mon Aug 13 08:14:03 2007 @@ -41,15 +41,23 @@ --EXPECTF-- *** Test copy() function: Trying to create a copy of an existing dir *** + +Warning: copy(): The first argument to copy() function cannot be a directory in %s/copy_variation12.php on line %d bool(false) bool(false) int(4096) -int(0) + +Warning: filesize(): stat failed for %s/copy_copy_variation12 in %s/copy_variation12.php on line %d +bool(false) *** Done *** --UEXPECTF-- *** Test copy() function: Trying to create a copy of an existing dir *** + +Warning: copy(): The first argument to copy() function cannot be a directory in %s/copy_variation12.php on line %d bool(false) bool(false) int(4096) -int(0) + +Warning: filesize(): stat failed for %s/copy_copy_variation12 in %s/copy_variation12.php on line %d +bool(false) *** Done *** http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/copy_variation13.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/standard/tests/file/copy_variation13.phpt diff -u php-src/ext/standard/tests/file/copy_variation13.phpt:1.2 php-src/ext/standard/tests/file/copy_variation13.phpt:1.3 --- php-src/ext/standard/tests/file/copy_variation13.phpt:1.2 Fri Aug 10 02:58:50 2007 +++ php-src/ext/standard/tests/file/copy_variation13.phpt Mon Aug 13 08:14:03 2007 @@ -1,5 +1,5 @@ --TEST-- -Test copy() function: usage variations - src as dir and dest as an existing file(Bug #42243) +Test copy() function: usage variations - src as dir and dest as an existing file (Bug #42243) --FILE-- <?php /* Prototype: bool copy ( string $source, string $dest ); @@ -44,7 +44,7 @@ *** Test copy() function: Trying to copy dir to file *** *** Testing copy() in copying dir to file *** -Warning: copy(%s): %s +Warning: copy(): The first argument to copy() function cannot be a directory in %s/copy_variation13.php on line %d bool(false) bool(true) bool(true) @@ -59,7 +59,7 @@ *** Test copy() function: Trying to copy dir to file *** *** Testing copy() in copying dir to file *** -Warning: copy(%s): %s +Warning: copy(): The first argument to copy() function cannot be a directory in %s/copy_variation13.php on line %d bool(false) bool(true) bool(true)

« previous php.cvs (#45876) next »