fix: complete InvesteMoz validation and error corrections
This commit is contained in:
@@ -36,7 +36,11 @@ final class RetainedGeoJsonCollection
|
||||
$position = 0;
|
||||
$peek = static function () use ($stream, &$buffer, &$position): ?string {
|
||||
if ($position === strlen($buffer)) {
|
||||
$buffer = fread($stream, 65536);
|
||||
$chunk = fread($stream, 65536);
|
||||
if ($chunk === false) {
|
||||
throw new \RuntimeException('Não foi possível ler o exemplar GeoJSON; original preservado.');
|
||||
}
|
||||
$buffer = $chunk;
|
||||
$position = 0;
|
||||
}
|
||||
|
||||
@@ -153,7 +157,7 @@ final class RetainedGeoJsonCollection
|
||||
}
|
||||
$expect('}');
|
||||
$white();
|
||||
abort_unless($peek() === null && $hadFeatures,422,'Exemplar incompleto ou com conteúdo adicional.');
|
||||
abort_unless($peek() === null && $hadFeatures, 422, 'Exemplar incompleto ou com conteúdo adicional.');
|
||||
|
||||
return $metadata;
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user