Update tickets_list.php#1227
Conversation
Checks to see if status is set in the GET paramaters. Without this, a warning is shown (if PHP errors are enabled): Warning: Undefined array key "status" in tickets_list.php on line 12
There was a problem hiding this comment.
Hello & Welcome! :)
Thanks for taking the time to help improve ITFlow. We're excited to review your contributions - we'll review this PR as soon as we can!
Whilst you're waiting, please feel free to check out the forum.
Just so you know, all contributions to ITFlow are licensed under the GNU GPL. By contributing you grant us a perpetual & irrevocable license to include your work in ITFlow.
|
nice catch before I can merge a few suggestions you have a double } at the end and should use && instead of another of another if condition |
|
Thanks for the quick reply. You're right, I nested the IF statements because I thought it would still cause the warning if it tried to evaluate "$_GET['status'] == 'Closed'" as part of an AND statement, but it doesn't. To be honest, after some more playing, it looks like the check for "Closed" status doesn't need to appear here. If "Closed" is selected as one of (or the only) options, checkboxes only show next to tickets which aren't closed. So I think all of the PHP code wrapping this selectAllCheckbox can be removed and it will be fine. |
Remove the check for "Closed" status to prevent a Warning when no statuses are selected. Otherwise the warning that shows is: Warning: Undefined array key "status" in tickets_list.php on line 12
|



Checks to see if status is set in the GET paramaters. Without this, a warning is shown (if PHP errors are enabled):
Warning: Undefined array key "status" in tickets_list.php on line 12