We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e34c826 commit bc400beCopy full SHA for bc400be
src/Lock.php
@@ -49,14 +49,18 @@ public function get($name)
49
50
public function set($name, $data)
51
{
52
- $this->lock[$name] = $data;
53
- $this->changed = true;
+ if (!\array_key_exists($name, $this->lock) || $data !== $this->lock[$name]) {
+ $this->lock[$name] = $data;
54
+ $this->changed = true;
55
+ }
56
}
57
58
public function remove($name)
59
- unset($this->lock[$name]);
60
+ if (\array_key_exists($name, $this->lock)) {
61
+ unset($this->lock[$name]);
62
63
64
65
66
public function write()
0 commit comments