diff --git a/core/modules/ckeditor/lib/Drupal/ckeditor/Tests/CKEditorTest.php b/core/modules/ckeditor/lib/Drupal/ckeditor/Tests/CKEditorTest.php index a71a725..4742de0 100644 --- a/core/modules/ckeditor/lib/Drupal/ckeditor/Tests/CKEditorTest.php +++ b/core/modules/ckeditor/lib/Drupal/ckeditor/Tests/CKEditorTest.php @@ -106,7 +106,8 @@ function testGetJSSettings() { // Change the allowed HTML tags; the "format_tags" setting for CKEditor // should automatically be updated as well. $format = entity_load('filter_format', 'filtered_html'); - $format->filters['filter_html']['settings']['allowed_html'] .= '
 

'; + $settings = &$format->filters('filter_html')->settings; + $settings['allowed_html'] .= '
 

'; $format->save(); $expected_config['format_tags'] = 'p;h3;h4;h5;h6;pre'; $this->assertEqual($expected_config, $this->ckeditor->getJSSettings($editor), 'Generated JS settings are correct for customized configuration.'); diff --git a/core/modules/text/text.module b/core/modules/text/text.module index f006b50..0c9fe2a 100644 --- a/core/modules/text/text.module +++ b/core/modules/text/text.module @@ -311,7 +311,7 @@ function text_summary($text, $format = NULL, $size = NULL) { $line_breaks = array('
' => 6, '
' => 4); // Newline only indicates a line break if line break converter // filter is present. - if ($filters->has('filter_autop') && $filters->get('filter_autop')->status) { + if (isset($filters) && $filters->has('filter_autop') && $filters->get('filter_autop')->status) { $line_breaks["\n"] = 1; } $break_points[] = $line_breaks; @@ -339,7 +339,7 @@ function text_summary($text, $format = NULL, $size = NULL) { } // If the htmlcorrector filter is present, apply it to the generated summary. - if ($filters->has('filter_htmlcorrector') && $filters->get('filter_htmlcorrector')->status) { + if (isset($filters) && $filters->has('filter_htmlcorrector') && $filters->get('filter_htmlcorrector')->status) { $summary = _filter_htmlcorrector($summary); }