Skip to content

Commit 0ed63d1

Browse files
committed
minor #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 #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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy