Skip to content

Commit 0ed63d1

Browse files
committed
minor symfony#6419 Update routing.rst (tamtamchik)
This PR was submitted for the 3.0 branch but it was merged into the 2.3 branch instead (closes symfony#6419). Discussion ---------- Update routing.rst | Q | A | ------------- | --- | Doc fix? | yes | New docs? | no | Applies to | all | Fixed tickets | none The described version of the file was breaking "default value" functionality, and if user would access this page without `name` variable it'll get warning: `Notice: Undefined variable: name in ../src/pages/hello.php on line 2` Commits ------- a29a319 Update routing.rst
2 parents b646db0 + a29a319 commit 0ed63d1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

create_framework/routing.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ As we now extract the request query parameters, simplify the ``hello.php``
3333
template as follows::
3434

3535
<!-- example.com/src/pages/hello.php -->
36-
Hello <?php echo htmlspecialchars($name, ENT_QUOTES, 'UTF-8') ?>
36+
Hello <?php echo htmlspecialchars(isset($name) ? $name : 'World', ENT_QUOTES, 'UTF-8') ?>
3737

3838
Now, we are in good shape to add new features.
3939

0 commit comments

Comments
 (0)