Skip to content

Commit 16b8b10

Browse files
committed
[FrameworkBundle] Fixed file operations in Sodium vault seal
1 parent 3a0b6d6 commit 16b8b10

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Secrets/SodiumVault.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public function seal(string $name, string $value): void
9090
$list = $this->list();
9191
$list[$name] = null;
9292
uksort($list, 'strnatcmp');
93-
file_put_contents($this->pathPrefix.'list.php', sprintf("<?php\n\nreturn %s;\n", VarExporter::export($list), \LOCK_EX));
93+
file_put_contents($this->pathPrefix.'list.php', sprintf("<?php\n\nreturn %s;\n", VarExporter::export($list)), \LOCK_EX);
9494

9595
$this->lastMessage = sprintf('Secret "%s" encrypted in "%s"; you can commit it.', $name, $this->getPrettyPath(\dirname($this->pathPrefix).\DIRECTORY_SEPARATOR));
9696
}
@@ -142,7 +142,7 @@ public function remove(string $name): bool
142142

143143
$list = $this->list();
144144
unset($list[$name]);
145-
file_put_contents($this->pathPrefix.'list.php', sprintf("<?php\n\nreturn %s;\n", VarExporter::export($list), \LOCK_EX));
145+
file_put_contents($this->pathPrefix.'list.php', sprintf("<?php\n\nreturn %s;\n", VarExporter::export($list)), \LOCK_EX);
146146

147147
$this->lastMessage = sprintf('Secret "%s" removed from "%s".', $name, $this->getPrettyPath(\dirname($this->pathPrefix).\DIRECTORY_SEPARATOR));
148148

0 commit comments

Comments
 (0)