fix: conflit de variable $ips dans stats() écrase le top IPs
Le foreach artIp30 utilisait $ips comme variable de boucle, écrasant le tableau de comptage des requêtes par IP. Résultat : ips=['66.249…':true] au lieu des vrais top 200 IPs. Renommé en $_artIpSet. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -5,6 +5,13 @@ Format : [Keep a Changelog](https://keepachangelog.com/fr/1.0.0/) — versionnag
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## [1.6.36] - 2026-05-19
|
||||||
|
|
||||||
|
### Corrigé
|
||||||
|
- AccessLogParser : `foreach ($this->artIp30 as $path => $ips)` écrasait la variable locale `$ips` (top IPs par volume), la remplaçant par le dernier ensemble d'IPs d'article. Renommé en `$_artIpSet`.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## [1.6.35] - 2026-05-19
|
## [1.6.35] - 2026-05-19
|
||||||
|
|
||||||
### Corrigé
|
### Corrigé
|
||||||
|
|||||||
+1
-1
@@ -1 +1 @@
|
|||||||
1.6.35
|
1.6.36
|
||||||
|
|||||||
@@ -161,11 +161,11 @@ class AccessLogParser
|
|||||||
|
|
||||||
// Visiteurs uniques par article (IPs publiques non-bot, /post/ statut 200)
|
// Visiteurs uniques par article (IPs publiques non-bot, /post/ statut 200)
|
||||||
$articleUv = [];
|
$articleUv = [];
|
||||||
foreach ($this->artIp30 as $path => $ips) {
|
foreach ($this->artIp30 as $path => $_artIpSet) {
|
||||||
$articleUv[$path] = [
|
$articleUv[$path] = [
|
||||||
'7' => count($this->artIp7[$path] ?? []),
|
'7' => count($this->artIp7[$path] ?? []),
|
||||||
'14' => count($this->artIp14[$path] ?? []),
|
'14' => count($this->artIp14[$path] ?? []),
|
||||||
'30' => count($ips),
|
'30' => count($_artIpSet),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user