8000 [view] fix return statement missing on ParamHolder and CacheManager (… · FriendsOfSymfony1/symfony1@d86803d · GitHub
[go: up one dir, main page]

Skip to content

Commit d86803d

Browse files
authored
[view] fix return statement missing on ParamHolder and CacheManager (#350)
1 parent ddc1528 commit d86803d

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

lib/view/sfViewCacheManager.class.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -439,9 +439,11 @@ public function remove($internalUri, $hostName = '', $vary = '', $contextualPref
439439
if (strpos($cacheKey, '*')) {
440440
return $this->cache->removePattern($cacheKey);
441441
}
442-
if ($this->cache->has($cacheKey)) {
443-
return $this->cache->remove($cacheKey);
442+
if (!$this->cache->has($cacheKey)) {
443+
return true;
444444
}
445+
446+
return $this->cache->remove($cacheKey);
445447
}
446448

447449
/**

lib/view/sfViewParameterHolder.class.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ public function initialize(sfEventDispatcher $dispatcher, $parameters = [], $opt
7777

7878
$this->setEscaping(isset($options['escaping_strategy']) ? $options['escaping_strategy'] : false);
7979
$this->setEscapingMethod(isset($options['escaping_method']) ? $options['escaping_method'] : 'ESC_SPECIALCHARS');
80+
81+
return true;
8082
}
8183

8284
/**

0 commit comments

Comments
 (0)
0