diff --git a/ext/mysqli/tests/mysqli_debug.phpt b/ext/mysqli/tests/mysqli_debug.phpt index 510de3dae00a9..ae6ae9bd27a6a 100644 --- a/ext/mysqli/tests/mysqli_debug.phpt +++ b/ext/mysqli/tests/mysqli_debug.phpt @@ -19,8 +19,10 @@ if (defined('MYSQLI_DEBUG_TRACE_ENABLED') && !MYSQLI_DEBUG_TRACE_ENABLED) --EXPECTF-- -[083][control string 'n:O,%smysqli_debug_phpt.trace'] Trace file has not been written. +[083][control string 'n:O,%s'] Trace file has not been written. done%s diff --git a/ext/mysqli/tests/mysqli_debug_mysqlnd_only.phpt b/ext/mysqli/tests/mysqli_debug_mysqlnd_only.phpt index 5327042127c3e..7dfe40d25ca18 100644 --- a/ext/mysqli/tests/mysqli_debug_mysqlnd_only.phpt +++ b/ext/mysqli/tests/mysqli_debug_mysqlnd_only.phpt @@ -65,7 +65,7 @@ if (defined('MYSQLI_DEBUG_TRACE_ENABLED') && !MYSQLI_DEBUG_TRACE_ENABLED) '_mysqlnd_pemalloc', '_mysqlnd_perealloc', ); - $trace_file = sprintf('%s%s%s', sys_get_temp_dir(), DIRECTORY_SEPARATOR, 'mysqli_debug_phpt.trace'); + $trace_file = tempnam(sys_get_temp_dir(), "mysqli_debug_phpt"); $trace = try_control_string($link, 't:m:O,' . $trace_file, $trace_file, 10); if (!strstr($trace, 'SELECT * FROM test') && !strstr($trace, 'mysql_real_query'))