Skip to content

Conversation

@tysoe27
Copy link

@tysoe27 tysoe27 commented Jul 3, 2025

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

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
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@johnnyq
Copy link
Collaborator

johnnyq commented Jul 3, 2025

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

@tysoe27
Copy link
Author

tysoe27 commented Jul 3, 2025

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
@sonarqubecloud
Copy link

sonarqubecloud bot commented Jul 3, 2025

@wrongecho wrongecho changed the base branch from master to develop August 6, 2025 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants