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

fix: PHP error - allowed memory size #581

Merged
merged 2 commits into from
Jan 8, 2025

Conversation

Rom1-B
Copy link
Contributor

@Rom1-B Rom1-B commented Dec 18, 2024

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.
  • This change requires a documentation update.

Description

  • It fixes !35468
  • Here is a brief description of what this PR does

Prevent this type of error message :

glpiphplog.CRITICAL:   *** PHP Error (1): Allowed memory size of 268435456 bytes exhausted (tried to allocate 48238592 bytes) in /data/glpi/plugins/glpiinventory/inc/task.class.php at line 1347

The logIfExtradebug() function is used to log data when the "extra-debug" option is enabled. However, when the data size is very large and this option is disabled, it triggers a memory exhaustion error when the function is called, even though the function itself does nothing.

Screenshots (if appropriate):

@trasher
Copy link
Collaborator

trasher commented Dec 18, 2024

I do not know if that solve your original issue, but it should be applied anyway.

@Rom1-B
Copy link
Contributor Author

Rom1-B commented Dec 18, 2024

I've set it to draft because I'd like confirmation from the client to see if this is sufficient or if we need to go further.

@Rom1-B Rom1-B marked this pull request as ready for review January 7, 2025 15:16
@stonebuzz
Copy link
Collaborator

can you adapt changelog ?

@trasher
Copy link
Collaborator

trasher commented Jan 7, 2025

Could you please rebase to solve conflicts?

@Rom1-B
Copy link
Contributor Author

Rom1-B commented Jan 8, 2025

I don't see any conflicts???

image

@trasher
Copy link
Collaborator

trasher commented Jan 8, 2025

I have on my side... :/
image

@trasher
Copy link
Collaborator

trasher commented Jan 8, 2025

I guess this is your last merge commit that cause issue.

@Rom1-B
Copy link
Contributor Author

Rom1-B commented Jan 8, 2025

Do you still see conflict?

@trasher
Copy link
Collaborator

trasher commented Jan 8, 2025

Do you still see conflict?

Nope, it's OK; thanks :)

@trasher trasher merged commit 31e41c4 into glpi-project:main Jan 8, 2025
8 checks passed
@Rom1-B Rom1-B deleted the support_35468 branch January 8, 2025 10:14
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.

3 participants