if ( !is_string( $tmpDirectory ) ) {
$tmpDirectory = self::getUsableTempDirectory();
}
- $path = wfTempDir() . '/' . $prefix . $hex . $ext;
+ $path = $tmpDirectory . '/' . $prefix . $hex . $ext;
Wikimedia\suppressWarnings();
$newFileHandle = fopen( $path, 'x' );
Wikimedia\restoreWarnings();