From: Antony Dovgal Date: Thu, 19 Jul 2007 15:49:45 +0000 (+0000) Subject: MFH: fix #41989 (move_uploaded_file() & relative path in ZTS mode) X-Git-Tag: php-5.2.4RC1~111 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=93af1c1f84aca471a2e6d48a0705b5db66d5a819;p=php MFH: fix #41989 (move_uploaded_file() & relative path in ZTS mode) --- diff --git a/NEWS b/NEWS index 95a9163b29..e9d4f5aa14 100644 --- 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 diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index b53d283786..64ebbaad3d 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -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));