]> granicus.if.org Git - php/commitdiff
MFH: fix #41989 (move_uploaded_file() & relative path in ZTS mode)
authorAntony Dovgal <tony2001@php.net>
Thu, 19 Jul 2007 15:49:45 +0000 (15:49 +0000)
committerAntony Dovgal <tony2001@php.net>
Thu, 19 Jul 2007 15:49:45 +0000 (15:49 +0000)
NEWS
ext/standard/basic_functions.c

diff --git a/NEWS b/NEWS
index 95a9163b29b05207f5c58a11fb94483f35d8eb2a..e9d4f5aa1448f470398ee2717b5a2d099ddb3892 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -60,6 +60,7 @@ PHP                                                                        NEWS
 - Fixed bug #42019 (configure option --with-adabas=DIR does not work). (Jani)
 - Fixed bug #42015 (ldap_rename(): server error "DSA is unwilling to perform").
   (bob at mroczka dot com, Jani)
+- Fixed bug #41989 (move_uploaded_file() & relative path in ZTS mode). (Tony)
 - Fixed bug #41964 (strtotime returns a timestamp for non-time string of
   pattern '(A|a) .+'). (Derick)
 - Fixed bug #41961 (Ensure search for hidden private methods does not stray
index b53d283786d6d922a618677f407f58e527540450..64ebbaad3d0a6372cda3c6de3acc04912c3304ff 100644 (file)
@@ -6096,7 +6096,7 @@ PHP_FUNCTION(move_uploaded_file)
        }
 
        VCWD_UNLINK(Z_STRVAL_PP(new_path));
-       if (rename(Z_STRVAL_PP(path), Z_STRVAL_PP(new_path)) == 0) {
+       if (VCWD_RENAME(Z_STRVAL_PP(path), Z_STRVAL_PP(new_path)) == 0) {
                successful = 1;
        } else if (php_copy_file_ex(Z_STRVAL_PP(path), Z_STRVAL_PP(new_path), STREAM_DISABLE_OPEN_BASEDIR TSRMLS_CC) == SUCCESS) {
                VCWD_UNLINK(Z_STRVAL_PP(path));