core/modules/system/src/Tests/Common/PageRenderTest.php | 4 ++-- core/modules/system/system.module | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/modules/system/src/Tests/Common/PageRenderTest.php b/core/modules/system/src/Tests/Common/PageRenderTest.php index cf8d848..09dd9b3 100644 --- a/core/modules/system/src/Tests/Common/PageRenderTest.php +++ b/core/modules/system/src/Tests/Common/PageRenderTest.php @@ -73,7 +73,7 @@ function assertPageRenderHookExceptions($module, $hook) { } catch (\LogicException $e) { $this->pass($assertion); - $this->assertEqual($e->getMessage(), 'Only #attached and #post_render_cache may be set in ' . $hook . '()'); + $this->assertEqual($e->getMessage(), 'Only #attached and #post_render_cache may be set in ' . $hook . '().'); } \Drupal::state()->set('bc_test.' . $hook . '.descendant_attached', FALSE); @@ -87,7 +87,7 @@ function assertPageRenderHookExceptions($module, $hook) { } catch (\LogicException $e) { $this->pass($assertion); - $this->assertEqual($e->getMessage(), 'Only #attached and #post_render_cache may be set in ' . $hook . '()'); + $this->assertEqual($e->getMessage(), 'Only #attached and #post_render_cache may be set in ' . $hook . '().'); } \Drupal::state()->set($module . '.' . $hook . '.render_array', FALSE); } diff --git a/core/modules/system/system.module b/core/modules/system/system.module index 5300b40..0d41bba 100644 --- a/core/modules/system/system.module +++ b/core/modules/system/system.module @@ -561,12 +561,12 @@ function system_page_attachments(array &$page) { $function($attachments); } if (array_diff(array_keys($attachments), ['#attached', '#post_render_cache']) !== []) { - throw new \LogicException('Only #attached and #post_render_cache may be set in hook_page_build()'); + throw new \LogicException('Only #attached and #post_render_cache may be set in hook_page_build().'); } \Drupal::moduleHandler()->alter('page', $attachments); \Drupal::theme()->alter('page', $attachments); if (array_diff(array_keys($attachments), ['#attached', '#post_render_cache']) !== []) { - throw new \LogicException('Only #attached and #post_render_cache may be set in hook_page_alter()'); + throw new \LogicException('Only #attached and #post_render_cache may be set in hook_page_alter().'); } if (isset($attachments['#attached'])) { $page['#attached'] = $attachments['#attached'];