Skip to content

Commit 542382c

Browse files
committed
ext/standard: create_data() is never called with a 4th argument
1 parent c04a2a5 commit 542382c

File tree

1 file changed

+4
-24
lines changed
  • ext/standard/tests/file/windows_mb_path

1 file changed

+4
-24
lines changed

ext/standard/tests/file/windows_mb_path/util.inc

Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -88,29 +88,9 @@ function remove_data($id, $dir = NULL)
8888
}
8989
}
9090

91-
function create_data($id, $item = "", $cp = 65001, $utf8 = true)
91+
/* Keep this file ASCII, so zend.multibyte related stuff can be tasted as well. */
92+
include __DIR__ . DIRECTORY_SEPARATOR . "util_utf8.inc";
93+
function create_data($id, $item = "", $cp = 65001)
9294
{
93-
if ($utf8) {
94-
/* Keep this file ASCII, so zend.multibyte related stuff can be tasted as well. */
95-
include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util_utf8.inc";
96-
return create_data_from_utf8($id, $item, $cp);
97-
} else {
98-
99-
$prefix = dirname(__FILE__) . DIRECTORY_SEPARATOR . $id;
100-
101-
if (!is_dir($prefix)) {
102-
mkdir($prefix);
103-
}
104-
105-
if (str_starts_with($id, "dir")) {
106-
create_verify_dir($prefix, $item, $cp);
107-
} else if (str_starts_with($id, "file")) {
108-
/* a bit unhandy, but content can be put from outside, if needed */
109-
create_verify_file($prefix, $item, "dummy content", $cp);
110-
} else {
111-
echo "Item has either to start with \"dir\" or \"file\"";
112-
}
113-
}
114-
115-
return $prefix;
95+
return create_data_from_utf8($id, $item, $cp);
11696
}

0 commit comments

Comments
 (0)