Skip to content

Commit 7f98734

Browse files
committed
fix: aggiunto warning nel log per tag con JSON malformato
1 parent 88d22c4 commit 7f98734

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src/HTMLBuilder/HTMLBuilder.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,14 @@ public static function decode($string, $type)
345345

346346
$json = (array) json_decode($string, true);
347347

348+
if (json_last_error() !== JSON_ERROR_NONE) {
349+
logger_osm()->warning('HTMLBuilder: tag con JSON malformato', [
350+
'error' => json_last_error_msg(),
351+
'type' => $type,
352+
'source' => $string,
353+
]);
354+
}
355+
348356
return $json;
349357
}
350358

0 commit comments

Comments
 (0)