From 4c0a55dbbb543d2d550c7eead2016a51ceef4837 Mon Sep 17 00:00:00 2001 From: Benjamin Dalsass <95754414+bdalsass@users.noreply.github.com> Date: Mon, 10 Jun 2024 16:13:45 +0200 Subject: [PATCH] =?UTF-8?q?N=C2=B05298=20-=20Upgrade=20CKEditor=20to=20ver?= =?UTF-8?q?sion=205=20-=20PrepareCKEditorValueTextEncodingForTextarea:=20a?= =?UTF-8?q?llow=20null=20value?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sources/Application/Helper/CKEditorHelper.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sources/Application/Helper/CKEditorHelper.php b/sources/Application/Helper/CKEditorHelper.php index a5b4b72f2..9210107ae 100644 --- a/sources/Application/Helper/CKEditorHelper.php +++ b/sources/Application/Helper/CKEditorHelper.php @@ -119,12 +119,15 @@ class CKEditorHelper * Encode value when using CKEditor with a TextArea. * @see https://ckeditor.com/docs/ckeditor5/latest/installation/getting-started/getting-and-setting-data.html#automatic-integration-with-html-forms * - * @param string $sValue + * @param string|null $sValue * - * @return string + * @return string|null */ - public static function PrepareCKEditorValueTextEncodingForTextarea(string $sValue) : string + public static function PrepareCKEditorValueTextEncodingForTextarea(string $sValue = null) : ?string { + if($sValue === null){ + return null; + } return str_replace( '&', '&', $sValue ); }