Mercurial > hg > isophonics-drupal-site
comparison vendor/symfony/http-foundation/Session/Storage/MockFileSessionStorage.php @ 17:129ea1e6d783
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:21:36 +0000 |
parents | 1fec387a4317 |
children |
comparison
equal
deleted
inserted
replaced
16:c2387f117808 | 17:129ea1e6d783 |
---|---|
96 foreach ($this->bags as $bag) { | 96 foreach ($this->bags as $bag) { |
97 if (empty($data[$key = $bag->getStorageKey()])) { | 97 if (empty($data[$key = $bag->getStorageKey()])) { |
98 unset($data[$key]); | 98 unset($data[$key]); |
99 } | 99 } |
100 } | 100 } |
101 if (array($key = $this->metadataBag->getStorageKey()) === array_keys($data)) { | 101 if ([$key = $this->metadataBag->getStorageKey()] === array_keys($data)) { |
102 unset($data[$key]); | 102 unset($data[$key]); |
103 } | 103 } |
104 | 104 |
105 try { | 105 try { |
106 if ($data) { | 106 if ($data) { |
143 * Reads session from storage and loads session. | 143 * Reads session from storage and loads session. |
144 */ | 144 */ |
145 private function read() | 145 private function read() |
146 { | 146 { |
147 $filePath = $this->getFilePath(); | 147 $filePath = $this->getFilePath(); |
148 $this->data = is_readable($filePath) && is_file($filePath) ? unserialize(file_get_contents($filePath)) : array(); | 148 $this->data = is_readable($filePath) && is_file($filePath) ? unserialize(file_get_contents($filePath)) : []; |
149 | 149 |
150 $this->loadSession(); | 150 $this->loadSession(); |
151 } | 151 } |
152 } | 152 } |