Skip to content

Update tickets_list.php #1227

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open

Update tickets_list.php #1227

wants to merge 2 commits into from

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