Commit 85bf906
committed
bug #4444 fix elseif statement (MightyBranch)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #4444).
Discussion
----------
fix elseif statement
| Q | A
| ------------- | ---
| Doc fix? | yes
| New docs? | no
| Applies to | all
| Fixed tickets | --
In this example of the book, the elseif block always evaluates to FALSE since $_SERVER['REQUEST_URI'] includes the query string, therefore if $uri equals to '/index.php/show' then $_GET['id'] is never set, and the list_action() is never executed.
Here I propose a fix by cleaning the query string from the URI before assigning it to $uri, using the built-in function parse_url().
Commits
-------
ab10529 fix elseif statement1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
367 | 367 | | |
368 | 368 | | |
369 | 369 | | |
370 | | - | |
| 370 | + | |
371 | 371 | | |
372 | 372 | | |
373 | 373 | | |
| |||
0 commit comments