From 95abeba7490be92bce356fcdae4617046a34b813 Mon Sep 17 00:00:00 2001 From: Gina Peter Banyard Date: Fri, 12 Dec 2025 18:13:42 +0000 Subject: [PATCH] ext/standard: create_data() is never called with a 4th argument --- .../tests/file/windows_mb_path/util.inc | 28 +++---------------- 1 file changed, 4 insertions(+), 24 deletions(-) diff --git a/ext/standard/tests/file/windows_mb_path/util.inc b/ext/standard/tests/file/windows_mb_path/util.inc index cec79aba56c..a94e2d75c51 100644 --- a/ext/standard/tests/file/windows_mb_path/util.inc +++ b/ext/standard/tests/file/windows_mb_path/util.inc @@ -90,29 +90,9 @@ function remove_data($id, $dir = NULL) } } -function create_data($id, $item = "", $cp = 65001, $utf8 = true) +/* Keep this file ASCII, so zend.multibyte related stuff can be tasted as well. */ +include __DIR__ . DIRECTORY_SEPARATOR . "util_utf8.inc"; +function create_data($id, $item = "", $cp = 65001) { - if ($utf8) { - /* Keep this file ASCII, so zend.multibyte related stuff can be tasted as well. */ - include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util_utf8.inc"; - return create_data_from_utf8($id, $item, $cp); - } else { - - $prefix = dirname(__FILE__) . DIRECTORY_SEPARATOR . $id; - - if (!is_dir($prefix)) { - mkdir($prefix); - } - - if (str_starts_with($id, "dir")) { - create_verify_dir($prefix, $item, $cp); - } else if (str_starts_with($id, "file")) { - /* a bit unhandy, but content can be put from outside, if needed */ - create_verify_file($prefix, $item, "dummy content", $cp); - } else { - echo "Item has either to start with \"dir\" or \"file\""; - } - } - - return $prefix; + return create_data_from_utf8($id, $item, $cp); }