Skip to content

Commit ac9b107

Browse files
authored
PHP8 Error : Undefined array key "richtext" fix
1 parent 9c6a43f commit ac9b107

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/functions/actions/mutate_content.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -883,7 +883,7 @@ function renderFormElement(
883883
global $_lang;
884884
global $ResourceManagerLoaded;
885885
global $content, $which_editor;
886-
if (!$ResourceManagerLoaded && !(($content['richtext'] == 1 || $modx->getManagerApi()->action == 4) && $modx->getConfig('use_editor') && $which_editor == 3)) {
886+
if (!$ResourceManagerLoaded && !(((isset($content['richtext']) && $content['richtext'] == 1) || $modx->getManagerApi()->action == 4) && $modx->getConfig('use_editor') && $which_editor == 3)) {
887887
$ResourceManagerLoaded = true;
888888
}
889889
$field_html .= '<input type="text" id="tv' . $field_id . '" name="tv' . $field_id . '" value="' . $field_value . '" ' . $field_style . ' onchange="documentDirty=true;" /><input type="button" value="' . $_lang['insert'] . '" onclick="BrowseFileServer(\'tv' . $field_id . '\')" />';

0 commit comments

Comments
 (0)