]> granicus.if.org Git - php/commitdiff
Merge branch 'PHP-7.3' into PHP-7.4
authorChristoph M. Becker <cmbecker69@gmx.de>
Mon, 27 Jul 2020 13:10:11 +0000 (15:10 +0200)
committerChristoph M. Becker <cmbecker69@gmx.de>
Mon, 27 Jul 2020 13:10:22 +0000 (15:10 +0200)
* PHP-7.3:
  Fix #79806: realpath() erroneously resolves link to link

1  2 
NEWS
Zend/zend_virtual_cwd.c
ext/standard/tests/file/realpath_basic4.phpt

diff --cc NEWS
index 09eca0b1c848e5c0330ed199329d840893690c37,ffb7d830cb64ba4ce44fe43b142a559e20b2dd16..94f7c4b62de364415bb05d9f860d05da56171a73
--- 1/NEWS
--- 2/NEWS
+++ b/NEWS
@@@ -5,8 -5,9 +5,9 @@@ PH
  - Core:
    . Fixed bug #79884 (PHP_CONFIG_FILE_PATH is meaningless). (cmb)
    . Fixed bug #77932 (File extensions are case-sensitive). (cmb)
+   . Fixed bug #79806 (realpath() erroneously resolves link to link). (cmb)
  
 -?? ??? ????, PHP 7.3.21
 +06 Aug 2020, PHP 7.4.9
  
  - Apache:
    . Fixed bug #79030 (Upgrade apache2handler's php_apache_sapi_get_request_time
Simple merge
index 47fd8040c7fc75b1e0183310a3105e54fe8c03b2,5f18dd9841656ff33dce2b23ecf65bd8173a1f56..524dde3056f74ee6f6a5c04a1dcc1ea131ba54e2
@@@ -1,19 -1,13 +1,13 @@@
  --TEST--
  Test realpath() with relative paths
- --SKIPIF--
- <?php
- if (substr(PHP_OS, 0, 3) == 'WIN') {
-     die('skip not for Windows');
- }
- ?>
  --FILE--
  <?php
 -$file_path = dirname(__FILE__);
 -@mkdir("$file_path/realpath_basic/home/test", 0777, true);
 -@symlink("$file_path/realpath_basic/home", "$file_path/realpath_basic/link1");
 -@symlink("$file_path/realpath_basic/link1", "$file_path/realpath_basic/link2");
 -echo "1. " . realpath("$file_path/realpath_basic/link2") . "\n";
 -echo "2. " . realpath("$file_path/realpath_basic/link2/test") . "\n";
 +$file_path = __DIR__;
 +@mkdir("$file_path/realpath_basic4/home/test", 0777, true);
 +@symlink("$file_path/realpath_basic4/home", "$file_path/realpath_basic4/link1");
 +@symlink("$file_path/realpath_basic4/link1", "$file_path/realpath_basic4/link2");
 +echo "1. " . realpath("$file_path/realpath_basic4/link2") . "\n";
 +echo "2. " . realpath("$file_path/realpath_basic4/link2/test") . "\n";
  ?>
  --CLEAN--
  <?php