Skip to content

Fix: avoid crash in search options hook when class unloaded - #384

Merged
Rom1-B merged 1 commit into
mainfrom
fix_load
Sep 30, 2026
Merged

Rom1-B merged 1 commit into
mainfrom
fix_load

Conversation

@Rom1-B

@Rom1-B Rom1-B commented Sep 30, 2026

Copy link
Copy Markdown
Contributor

Checklist before requesting a review

Please delete options that are not relevant.

  • I have performed a self-review of my code.
  • I have added tests (when available) that prove my fix is effective or that my feature works.
  • I have updated the CHANGELOG with a short functional description of the fix or new feature.
  • This change requires a documentation update.

Description

  • It fixes #N/A
  • The search options hook crashed with a ClassNotFoundError when it ran before the plugin's main class was autoloaded, for example during the maintenance stage of a GLPI database migration.
  • The hook now checks that the class is loaded before calling its static methods, so the migration can complete instead of aborting.

Screenshots (if appropriate):

@Rom1-B
Rom1-B requested a review from stonebuzz September 30, 2026 12:29
@stonebuzz

Copy link
Copy Markdown
Contributor

@Rom1-B

is needed for GLPI 10 version ?

@Rom1-B
Rom1-B merged commit 003a10c into main Sep 30, 2026
7 checks passed
@Rom1-B
Rom1-B deleted the fix_load branch September 30, 2026 13:20
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