Skip to content

Commit

Permalink
PHP8 Error : Undefined array key "richtext" fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lazar2038 authored Jan 27, 2022
1 parent 9c6a43f commit ac9b107
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/functions/actions/mutate_content.php
Original file line number Diff line number Diff line change
Expand Up @@ -883,7 +883,7 @@ function renderFormElement(
global $_lang;
global $ResourceManagerLoaded;
global $content, $which_editor;
if (!$ResourceManagerLoaded && !(($content['richtext'] == 1 || $modx->getManagerApi()->action == 4) && $modx->getConfig('use_editor') && $which_editor == 3)) {
if (!$ResourceManagerLoaded && !(((isset($content['richtext']) && $content['richtext'] == 1) || $modx->getManagerApi()->action == 4) && $modx->getConfig('use_editor') && $which_editor == 3)) {
$ResourceManagerLoaded = true;
}
$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 . '\')" />';
Expand Down

0 comments on commit ac9b107

Please sign in to comment.