Skip to content

Commit

Permalink
Fix some issues with the ldap data extractor
Browse files Browse the repository at this point in the history
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
  • Loading branch information
CarlSchwan committed Mar 29, 2022
1 parent 32ddc1f commit 66fdc61
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion apps/user_ldap/lib/DataCollector/LdapDataCollector.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public function startLdapRequest(string $query, array $args): void {
'start' => microtime(true),
'query' => $query,
'args' => $args,
'end' => -1
'end' => microtime(true),
];
}

Expand Down
4 changes: 2 additions & 2 deletions apps/user_ldap/lib/LDAP.php
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ private function preFunctionCall(string $functionName, array $args): void {
$this->curArgs = $args;

if ($this->dataCollector !== null) {
$args = array_reduce($this->curArgs, static function (array $carry, $item): array {
$args = array_reduce($this->curArgs, function (array $carry, $item): array {
$carry[] = !$this->isResource($item) ? $item : '(resource)';
return $carry;
}, []);
Expand All @@ -329,7 +329,7 @@ private function preFunctionCall(string $functionName, array $args): void {
}

if ($this->logFile !== '' && is_writable(dirname($this->logFile)) && (!file_exists($this->logFile) || is_writable($this->logFile))) {
$args = array_reduce($this->curArgs, static function (array $carry, $item): array {
$args = array_reduce($this->curArgs, function (array $carry, $item): array {
$carry[] = !$this->isResource($item) ? $item : '(resource)';
return $carry;
}, []);
Expand Down

0 comments on commit 66fdc61

Please sign in to comment.