Skip to content

Commit c8c3a98

Browse files
don't ignore first line of buffer file now it no longer has the php exit line
1 parent 8ee2339 commit c8c3a98

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/class-aggregator.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,6 @@ public static function run(): void
5454
return;
5555
}
5656

57-
// read and ignore first line (the PHP header that prevents direct file access)
58-
\fgets($file_handle);
59-
6057
while (($line = \fgets($file_handle)) !== false) {
6158
$line = \trim($line);
6259
if ($line === '' || $line === '<?php exit; ?>') {
@@ -66,6 +63,7 @@ public static function run(): void
6663
$params = \unserialize($line, ['allowed_classes' => false]);
6764
if (! \is_array($params)) {
6865
error_log('Koko Analytics: unserialize error encountered while processing line in buffer file');
66+
continue;
6967
}
7068
$type = \array_shift($params);
7169

0 commit comments

Comments
 (0)