Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 3bf89b6

Browse filesBrowse files
committed
bug #19640 [Cache] Minor fixes after merging 3.1 (nicolas-grekas)
This PR was merged into the 3.2-dev branch. Discussion ---------- [Cache] Minor fixes after merging 3.1 | Q | A | ------------- | --- | Branch? | master | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - Commits ------- 0f9e54a [Cache] Minor fixes after merging 3.1
2 parents 77e0161 + 0f9e54a commit 3bf89b6
Copy full SHA for 3bf89b6

File tree

Expand file treeCollapse file tree

2 files changed

+4
-4
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+4
-4
lines changed

‎src/Symfony/Component/Cache/Adapter/ArrayAdapter.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Cache/Adapter/ArrayAdapter.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public function getItem($key)
6464
} elseif ('b:0;' === $value = $this->values[$key]) {
6565
$value = false;
6666
} elseif (false === $value = unserialize($value)) {
67-
$value = null;
67+
$this->values[$key] = $value = null;
6868
$isHit = false;
6969
}
7070
} catch (\Exception $e) {
@@ -210,7 +210,7 @@ private function generateItems(array $keys, $now)
210210
} elseif ('b:0;' === $value = $this->values[$key]) {
211211
$value = false;
212212
} elseif (false === $value = unserialize($value)) {
213-
$value = null;
213+
$this->values[$key] = $value = null;
214214
$isHit = false;
215215
}
216216
} catch (\Exception $e) {

‎src/Symfony/Component/Cache/Adapter/PhpFilesAdapter.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Cache/Adapter/PhpFilesAdapter.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ protected function doFetch(array $ids)
7070
if ('N;' === $value) {
7171
$values[$id] = null;
7272
} elseif (is_string($value) && isset($value[2]) && ':' === $value[1]) {
73-
$values[$id] = unserialize($value);
73+
$values[$id] = parent::unserialize($value);
7474
}
7575
}
7676

@@ -98,7 +98,7 @@ protected function doSave(array $values, $lifetime)
9898
$value = serialize($value);
9999
} elseif (is_array($value)) {
100100
$serialized = serialize($value);
101-
$unserialized = unserialize($serialized);
101+
$unserialized = parent::unserialize($serialized);
102102
// Store arrays serialized if they contain any objects or references
103103
if ($unserialized !== $value || (false !== strpos($serialized, ';R:') && preg_match('/;R:[1-9]/', $serialized))) {
104104
$value = $serialized;

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.