cleanup session temp file (#2641)

* cleanup session temp file

* Fix Deprecated: Automatic conversion of false to array
This commit is contained in:
Remi Collet
2025-03-26 23:25:22 +01:00
committed by GitHub
parent 52e2b8a788
commit 3828c9293b
2 changed files with 8 additions and 2 deletions
+1
View File
@@ -6185,6 +6185,7 @@ class Redis_Test extends TestSuite {
// Use a unique ID so we can find our type keys
$id = uniqid();
$keys = [];
// Create some simple keys and lists
for ($i = 0; $i < 3; $i++) {
$simple = "simple:{$id}:$i";
+7 -2
View File
@@ -80,7 +80,7 @@ class Runner {
];
private $prefix = NULL;
private $output_file;
private $output_file = NULL;
private $exit_code = -1;
private $cmd = NULL;
private $pid;
@@ -90,6 +90,12 @@ class Runner {
$this->args['id'] = $this->createId();
}
public function __destruct() {
if ($this->output_file) {
unlink($this->output_file);
}
}
public function getExitCode(): int {
return $this->exit_code;
}
@@ -183,7 +189,6 @@ class Runner {
}
private function getTmpFileName() {
return '/tmp/sessiontmp.txt';
return tempnam(sys_get_temp_dir(), 'session');
}