Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commitbd3ca8e

Browse files
committed
fixed extract() calls
1 parent7e8da09 commitbd3ca8e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎book/part4.rst

Lines 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)

[8]ページ先頭

©2009-2025 Movatter.jp