Skip to content

Commit

Permalink
fix: PHP error - allowed memory size (#581)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rom1-B authored Jan 8, 2025
1 parent 95a2741 commit 31e41c4
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
## [Unreleased]

### Fixed

- Ensure that the `Taskjob` identifier is used to extract the device IP.
- Isolate dynamic group criteria to prevent their global reapplication in GLPI.
- Fixes memory exhaustion when "extra-debug" is disabled

## [1.4.0] - 2024-09-06

Expand Down
26 changes: 14 additions & 12 deletions inc/task.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1332,19 +1332,21 @@ public function ajaxGetJobLogs($options = [])
session_write_close();

$logs = $this->getJoblogs($task_ids, true, false);
PluginGlpiinventoryToolbox::logIfExtradebug(
"pluginGlpiinventory-tasks",
"ajaxGetJobLogs, agents: " . count($logs['agents'])
);
PluginGlpiinventoryToolbox::logIfExtradebug(
"pluginGlpiinventory-tasks",
"ajaxGetJobLogs, tasks: " . count($logs['tasks'])
);
if (PluginGlpiinventoryConfig::isExtradebugActive()) {
PluginGlpiinventoryToolbox::logIfExtradebug(
"pluginGlpiinventory-tasks",
"ajaxGetJobLogs, agents: " . count($logs['agents'])
);
PluginGlpiinventoryToolbox::logIfExtradebug(
"pluginGlpiinventory-tasks",
"ajaxGetJobLogs, tasks: " . count($logs['tasks'])
);

PluginGlpiinventoryToolbox::logIfExtradebug(
"pluginGlpiinventory-tasks",
"ajaxGetJobLogs: " . print_r($logs, true)
);
PluginGlpiinventoryToolbox::logIfExtradebug(
"pluginGlpiinventory-tasks",
"ajaxGetJobLogs: " . print_r($logs, true)
);
}
$out = json_encode($logs);
if (
isset($options['display'])
Expand Down

0 comments on commit 31e41c4

Please sign in to comment.