asd
This commit is contained in:
@@ -256,6 +256,21 @@ class ApiKernel
|
|||||||
return $node;
|
return $node;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private function encodeJson($value): string
|
||||||
|
{
|
||||||
|
$options = JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES;
|
||||||
|
$json = json_encode($value, $options, 2048);
|
||||||
|
if ($json === false) {
|
||||||
|
$json = json_encode(
|
||||||
|
$value,
|
||||||
|
$options | JSON_PARTIAL_OUTPUT_ON_ERROR | JSON_INVALID_UTF8_SUBSTITUTE,
|
||||||
|
2048
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $json === false ? '' : $json;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// =================================================================
|
// =================================================================
|
||||||
// 🚀 CRUD HANDLER METHODEN
|
// 🚀 CRUD HANDLER METHODEN
|
||||||
@@ -430,7 +445,7 @@ class ApiKernel
|
|||||||
$components = is_string($json) ? json_decode($json, true) : $json;
|
$components = is_string($json) ? json_decode($json, true) : $json;
|
||||||
if (is_array($components)) {
|
if (is_array($components)) {
|
||||||
$components = $this->cleanReferenceComponents($components); // BEREINIGUNG
|
$components = $this->cleanReferenceComponents($components); // BEREINIGUNG
|
||||||
$data[$jsonDbCol] = json_encode($components, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);
|
$data[$jsonDbCol] = $this->encodeJson($components);
|
||||||
} else {
|
} else {
|
||||||
$data[$jsonDbCol] = is_string($json) ? $json : '';
|
$data[$jsonDbCol] = is_string($json) ? $json : '';
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user