Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion lib/Service/Classification/PersistenceService.php
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,15 @@
}

$serializedData = json_decode($json);
return array_map(base64_decode(...), $serializedData);
$decodedData = array_map(base64_decode(...), $serializedData);
foreach ($decodedData as $decoded) {
if ($decoded === false) {

Check warning on line 210 in lib/Service/Classification/PersistenceService.php

View check run for this annotation

Codecov / codecov/patch

lib/Service/Classification/PersistenceService.php#L208-L210

Added lines #L208 - L210 were not covered by tests
// Decoding failed, abort
return null;

Check warning on line 212 in lib/Service/Classification/PersistenceService.php

View check run for this annotation

Codecov / codecov/patch

lib/Service/Classification/PersistenceService.php#L212

Added line #L212 was not covered by tests
}
}
/** @var string[] $decodedData */
return $decodedData;

Check warning on line 216 in lib/Service/Classification/PersistenceService.php

View check run for this annotation

Codecov / codecov/patch

lib/Service/Classification/PersistenceService.php#L216

Added line #L216 was not covered by tests
}

/**
Expand Down