core/includes/common.inc | 4 ++-- core/modules/system/system.module | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/includes/common.inc b/core/includes/common.inc index d4fb368..f656206 100644 --- a/core/includes/common.inc +++ b/core/includes/common.inc @@ -2470,13 +2470,13 @@ function drupal_prepare_page($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_attachments()'); + throw new \LogicException('Only #attached and #post_render_cache may be set in hook_page_attachments().'); } // Modules and themes can alter page attachments. \Drupal::moduleHandler()->alter('page_attachments', $attachments); \Drupal::theme()->alter('page_attachments', $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_attachments_alter()'); + throw new \LogicException('Only #attached and #post_render_cache may be set in hook_page_attachments_alter().'); } if (isset($attachments['#attached'])) { $page['#attached'] = $attachments['#attached']; diff --git a/core/modules/system/system.module b/core/modules/system/system.module index a4c3c09..5300b40 100644 --- a/core/modules/system/system.module +++ b/core/modules/system/system.module @@ -554,7 +554,7 @@ function system_page_attachments(array &$page) { } // Invoke hook_page_build() for modules and hook_page_alter() for both modules - // and, for backwards compatibility. + // and themes, for backwards compatibility. $attachments = []; foreach (\Drupal::moduleHandler()->getImplementations('page_build') as $module) { $function = $module . '_page_build';