We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b645c85 commit 80fdf23Copy full SHA for 80fdf23
1 file changed
migrations/m4_serialize_to_json.php
@@ -33,6 +33,13 @@ public function update_data()
33
*/
34
public function serialize_to_json($cfg)
35
{
36
+ // This check is needed to prevent errors when uninstalling this migration/extension
37
+ json_decode($this->config[$cfg], false);
38
+ if (json_last_error() === JSON_ERROR_NONE)
39
+ {
40
+ return '';
41
+ }
42
+
43
$data = unserialize(trim($this->config[$cfg]), ['allowed_classes' => false]);
44
45
return $data ? json_encode($data) : '';
0 commit comments