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 bd3ca8e

Browse filesBrowse files
committed
fixed extract() calls
1 parent 7e8da09 commit bd3ca8e
Copy full SHA for bd3ca8e

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

+2
-2
lines changed

‎book/part4.rst

Copy file name to clipboardExpand all lines: book/part4.rst
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ a little to make templates even more readable::
2323
$path = $request->getPathInfo();
2424
if (isset($map[$path])) {
2525
ob_start();
26-
extract($request->query->all());
26+
extract($request->query->all(), EXTR_SKIP);
2727
include sprintf(__DIR__.'/../src/pages/%s.php', $map[$path]);
2828
$response = new Response(ob_get_clean());
2929
} else {
@@ -169,7 +169,7 @@ With this knowledge in mind, let's write the new version of our framework::
169169
$matcher = new Routing\Matcher\UrlMatcher($routes, $context);
170170

171171
try {
172-
extract($matcher->match($request->getPathInfo()));
172+
extract($matcher->match($request->getPathInfo()), EXTR_SKIP);
173173
ob_start();
174174
include sprintf(__DIR__.'/../src/pages/%s.php', $_route);
175175

0 commit comments

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