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 32d964b

Browse filesBrowse files
m14tfabpot
authored andcommitted
Fix calls to HttpCache#getSurrogate triggering E_USER_DEPRECATED errors.
1 parent cd8ccff commit 32d964b
Copy full SHA for 32d964b

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

+6
-6
lines changed

‎src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php
+6-6Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,11 @@ public function getKernel()
160160
*/
161161
public function getSurrogate()
162162
{
163-
return $this->getEsi();
163+
if (!$this->surrogate instanceof Esi) {
164+
throw new \LogicException('This instance of HttpCache was not set up to use ESI as surrogate handler. You must overwrite and use createSurrogate');
165+
}
166+
167+
return $this->surrogate;
164168
}
165169

166170
/**
@@ -176,11 +180,7 @@ public function getEsi()
176180
{
177181
@trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use the getSurrogate() method instead.', E_USER_DEPRECATED);
178182

179-
if (!$this->surrogate instanceof Esi) {
180-
throw new \LogicException('This instance of HttpCache was not set up to use ESI as surrogate handler. You must overwrite and use createSurrogate');
181-
}
182-
183-
return $this->surrogate;
183+
return $this->getSurrogate();
184184
}
185185

186186
/**

0 commit comments

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