From: Sara Golemon Date: Mon, 9 Oct 2006 02:52:27 +0000 (+0000) Subject: Fix realpath() in unicode mode X-Git-Tag: RELEASE_1_0_0RC1~1341 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=25af62e3f423c8d0db04a6faa8f144bb40cc944e;p=php Fix realpath() in unicode mode --- diff --git a/ext/standard/file.c b/ext/standard/file.c index 25646e3f25..21e2393c45 100644 --- a/ext/standard/file.c +++ b/ext/standard/file.c @@ -2432,10 +2432,11 @@ PHP_FUNCTION(realpath) UChar *path; int path_len; - if (php_stream_path_decode(&php_plain_files_wrapper, &path, &path_len, filename, filename_len, REPORT_ERRORS, FG(default_context)) == SUCCESS) { + if (php_stream_path_decode(&php_plain_files_wrapper, &path, &path_len, resolved_path_buff, strlen(resolved_path_buff), REPORT_ERRORS, FG(default_context)) == SUCCESS) { RETVAL_UNICODEL(path, path_len, 0); } else { - RETVAL_FALSE; + /* Fallback */ + RETVAL_STRING(resolved_path_buff, 1); } } else { RETVAL_STRING(resolved_path_buff, 1);