Skip to content
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

PHP Notice (8): Undefined index: ... Ticket.php #12630

Closed
2 tasks done
WebGregGit opened this issue Sep 12, 2022 · 3 comments
Closed
2 tasks done

PHP Notice (8): Undefined index: ... Ticket.php #12630

WebGregGit opened this issue Sep 12, 2022 · 3 comments

Comments

@WebGregGit
Copy link

WebGregGit commented Sep 12, 2022

Code of Conduct

  • I agree to follow this project's Code of Conduct

Is there an existing issue for this?

  • I have searched the existing issues

Version

10.0.3-dev

Bug description

PHP Notice (8): Undefined index: itilcategories_id in /var/www/html/glpi/src/Ticket.php at line 3910
PHP Notice (8): Undefined index: type in /var/www/html/glpi/src/Ticket.php at line 3935
PHP Notice (8): Undefined index: itilcategories_id in /var/www/html/glpi/src/Ticket.php at line 3936
PHP Notice (8): Undefined index: entities_id in /var/www/html/glpi/src/Ticket.php at line 3943
PHP Notice (8): Undefined index: _users_id_requester in /var/www/html/glpi/src/Ticket.php at line 3945

If I log in as a user - I don't see an error.

However, if I log in to the admin, run debug mode and change to user profile, then go to the ticket creation page, I see such warnings.
When I change the type of notification - then the number of alerts decreases.

image

and type change:

image

Even if I go back to the incident type, only these two are displayed.

Relevant log output

php-errors.log
[2022-09-12 16:31:55] glpiphplog.NOTICE: *** PHP Notice (8): Undefined index: itilcategories_id in /var/www/html/glpi/src/Ticket.php at line 3910
Backtrace :
front/helpdesk.public.php:98 Ticket->showFormHelpdesk()

[2022-09-12 16:31:55] glpiphplog.NOTICE: *** PHP Notice (8): Undefined index: type in /var/www/html/glpi/src/Ticket.php at line 3935
Backtrace :
front/helpdesk.public.php:98 Ticket->showFormHelpdesk()

[2022-09-12 16:31:55] glpiphplog.NOTICE: *** PHP Notice (8): Undefined index: itilcategories_id in /var/www/html/glpi/src/Ticket.php at line 3936
Backtrace :
front/helpdesk.public.php:98 Ticket->showFormHelpdesk()

[2022-09-12 16:31:55] glpiphplog.NOTICE: *** PHP Notice (8): Undefined index: entities_id in /var/www/html/glpi/src/Ticket.php at line 3943
Backtrace :
front/helpdesk.public.php:98 Ticket->showFormHelpdesk()

[2022-09-12 16:31:55] glpiphplog.NOTICE: *** PHP Notice (8): Undefined index: _users_id_requester in /var/www/html/glpi/src/Ticket.php at line 3945
Backtrace :
front/helpdesk.public.php:98 Ticket->showFormHelpdesk()

Page URL

front/helpdesk.public.php?create_ticket=1

Steps To reproduce

  1. Log in as an administrator.
  2. Enable debug mode.
  3. Change the profile to one with a simple interface set up.
  4. Open the application form.

Your GLPI setup information

No response

Anything else?

No response

@cconard96
Copy link
Contributor

Which commit are you testing on?
This issue should be fixed by #12473

@WebGregGit
Copy link
Author

Yep - it works.

Sorry.
I am a bit confused about which version I have, and the system does not show it exactly. It would be nice to add the date on the nightly release, not just the -dev.

image

Unless you can see this date somewhere and I missed it

@cconard96
Copy link
Contributor

It used to show the git commit info if there was a .git folder present, but that wouldn't work for the nightly releases, and it seems broken on newer versions of git if the owner of the folder contents is different than the web server's user and is also not marked as a safe directory in the global git config.

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

No branches or pull requests

2 participants