1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-08 07:47:00 +02:00

Fix issue with WireLog::getLogs() returning regular PHP array rather than associative array indexed by log name

This commit is contained in:
Ryan Cramer
2023-03-22 14:29:59 -04:00
parent 547fb4cf71
commit f7ee00d785

View File

@@ -212,7 +212,7 @@ class WireLog extends Wire {
* #pw-group-retrieval * #pw-group-retrieval
* *
* @param bool $sortNewest Sort by newest to oldest rather than by name? (default=false) Added 3.0.143 * @param bool $sortNewest Sort by newest to oldest rather than by name? (default=false) Added 3.0.143
* @return array * @return array Indexed by log name
* *
*/ */
public function getLogs($sortNewest = false) { public function getLogs($sortNewest = false) {
@@ -242,7 +242,7 @@ class WireLog extends Wire {
ksort($logs); ksort($logs);
} }
return array_values($logs); return $logs;
} }
/** /**