Verified Commit 33d2b7f0 authored by Cyril Vazquez's avatar Cyril Vazquez
Browse files

Fix no event or too many event lines due to broken csv parsing

parent f234c1ac
Pipeline #14594 failed with stages
in 49 seconds
......@@ -111,13 +111,16 @@ class log
*/
public function contents($res)
{
$journal = explode(PHP_EOL, $res);
//$journal = explode(PHP_EOL, $res);
$journal = str_getcsv($res, "\n");
$id = str_getcsv($journal[1]);
$head = str_getcsv($journal[2]);
$events = [];
for ($i = 3; $i < count($journal) - 1; $i++) {
$events[] = str_getcsv($journal[$i]);
if (!empty($journal[$i])) {
$events[] = str_getcsv($journal[$i]);
}
}
$type = $journal[0];
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment