iliaa Fri Aug 10 00:36:57 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/standard file.c /php-src NEWS Log: Fixed bug #42243 (copy() does not ouput an error when the first arg is a dir). http://cvs.php.net/viewvc.cgi/php-src/ext/standard/file.c?r1=1.409.2.6.2.22&r2=1.409.2.6.2.23&diff_format=u Index: php-src/ext/standard/file.c diff -u php-src/ext/standard/file.c:1.409.2.6.2.22 php-src/ext/standard/file.c:1.409.2.6.2.23 --- php-src/ext/standard/file.c:1.409.2.6.2.22 Wed Aug 8 22:32:24 2007 +++ php-src/ext/standard/file.c Fri Aug 10 00:36:57 2007 @@ -21,7 +21,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: file.c,v 1.409.2.6.2.22 2007/08/08 22:32:24 tony2001 Exp $ */ +/* $Id: file.c,v 1.409.2.6.2.23 2007/08/10 00:36:57 iliaa Exp $ */ /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */ @@ -1765,6 +1765,10 @@ 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 (!src_s.sb.st_ino || !dest_s.sb.st_ino) { goto no_stat; } http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.890&r2=1.2027.2.547.2.891&diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.890 php-src/NEWS:1.2027.2.547.2.891 --- php-src/NEWS:1.2027.2.547.2.890 Fri Aug 10 00:30:04 2007 +++ php-src/NEWS Fri Aug 10 00:36:57 2007 @@ -4,6 +4,8 @@ - Fixed bug #42261 (header wrong for date field). (roberto at spadim dot com dot br, Ilia) - Fixed bug #42247 (ldap_parse_result() not defined under win32). (Jani) +- Fixed bug #42243 (copy() does not ouput an error when the first arg is a + dir). (Ilia) - Fixed bug #42237 (stream_copy_to_stream returns invalid values for mmaped streams). (andrew dot minerd at sellingsource dot com, Ilia) - Fixed bug #42233 (Problems with æøå in extract()). (Jani)
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php