Skip to content

Commit 17a80eb

Browse files
committed
ext/mysqli: Remove custom sys_get_temp_dir() function
It has existed since PHP 5.2.1...
1 parent 092726f commit 17a80eb

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

ext/mysqli/tests/connect.inc

-20
Original file line numberDiff line numberDiff line change
@@ -25,26 +25,6 @@
2525
/* Development setting: test experimental features and/or feature requests that never worked before? */
2626
$TEST_EXPERIMENTAL = 1 == getenv("MYSQL_TEST_EXPERIMENTAL");
2727

28-
if (!function_exists('sys_get_temp_dir')) {
29-
function sys_get_temp_dir() {
30-
31-
if (!empty($_ENV['TMP']))
32-
return realpath( $_ENV['TMP'] );
33-
if (!empty($_ENV['TMPDIR']))
34-
return realpath( $_ENV['TMPDIR'] );
35-
if (!empty($_ENV['TEMP']))
36-
return realpath( $_ENV['TEMP'] );
37-
38-
$temp_file = tempnam(md5(uniqid(rand(), TRUE)), '');
39-
if ($temp_file) {
40-
$temp_dir = realpath(dirname($temp_file));
41-
unlink($temp_file);
42-
return $temp_dir;
43-
}
44-
return FALSE;
45-
}
46-
}
47-
4828
if (!function_exists('my_mysqli_connect')) {
4929

5030
/**

0 commit comments

Comments
 (0)