Fix E_WARNING in DocumentController

This commit is contained in:
Kijin Sung 2015-12-18 23:19:53 +09:00
parent 582104b04d
commit 55a2944f17

View file

@ -294,7 +294,7 @@ class documentController extends document
$oModuleModel = getModel('module');
$editor_config = $oModuleModel->getModuleConfig('editor');
if(substr_compare($editor_config->sel_editor_colorset, 'nohtml', -6) === 0 && !$manual_inserted)
if(strlen($editor_config->sel_editor_colorset) >= 6 && substr_compare($editor_config->sel_editor_colorset, 'nohtml', -6) === 0 && !$manual_inserted)
{
$obj->content = preg_replace('/\r|\n/', '', nl2br(htmlspecialchars($obj->content, ENT_COMPAT | ENT_HTML401, 'UTF-8', false)));
}