Skip to content

Commit 43a0ed4

Browse files
committed
ext/standard: create_data() is never called with a 4th argument
1 parent 25664dc commit 43a0ed4

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
@@ -90,29 +90,9 @@ function remove_data($id, $dir = NULL)
9090
}
9191
}
9292

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

0 commit comments

Comments
 (0)