com php-src: Fixed bug #74589 __DIR__ wrong for u nicode character: Zend/zend_compile.c
[email protected] (Anatol Belski)
| Newsgroups | php.cvs |
|---|---|
| Message-ID | <[email protected]> |
Commit: ae3f975c5d58f891359a72ad3df84d845e70cdcc Author: Anatol Belski <[email protected]> Mon, 15 May 2017 16:35:22 +0200 Parents: c1d57186976e75a2a54f7bd167a77e2872cadc6a Branches: PHP-7.1 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=ae3f975c5d58f891359a72ad3df84d845e70cdcc Log: Fixed bug #74589 __DIR__ wrong for unicode character Bugs: https://bugs.php.net/74589 Changed paths: M Zend/zend_compile.c Diff: diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index cea28d6..bc4e3f0 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -6455,7 +6455,11 @@ static zend_bool zend_try_ct_eval_magic_const(zval *zv, zend_ast *ast) /* {{{ */ { zend_string *filename = CG(compiled_filename); zend_string *dirname = zend_string_init(ZSTR_VAL(filename), ZSTR_LEN(filename), 0); +#ifdef ZEND_WIN32 + php_win32_ioutil_dirname(ZSTR_VAL(dirname), ZSTR_LEN(dirname)); +#else zend_dirname(ZSTR_VAL(dirname), ZSTR_LEN(dirname)); +#endif if (strcmp(ZSTR_VAL(dirname), ".") == 0) { dirname = zend_string_extend(dirname, MAXPATHLEN, 0);