Problem/Motivation

While looking for some code snippets in Core files the following typos are found.

  1. In core/lib/Drupal/Core/EventSubscriber/HttpExceptionSubscriberBase.php line # 59
    /**
       * Specifies the request formats this subscriber will respond to.
       *
       * @return array
       *   An indexed array of the format machine names that this subscriber will
       *   attempt ot process,such as "html" or "json". Returning an empty array
    

    ot should be to

  2. In core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/StackedKernelPassTest.php line # 101
    /**
       * Creates a middleware definition.
       *
       * @param bool $tag
       *   Whether ot not to set the http_middleware tag.
    

    ot should be or

Proposed resolution

Fix the typo in a simple patch.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

aneek created an issue. See original summary.

joshi.rohit100’s picture

Status: Active » Needs review
FileSize
1.39 KB
aneek’s picture

@joshi.rohit100, great! One comment though,

+++ b/core/lib/Drupal/Core/EventSubscriber/HttpExceptionSubscriberBase.php
@@ -56,7 +56,7 @@
+   *   attempt to process,such as "html" or "json". Returning an empty array

Can you please add a white space between the comma? That will be very helpful.

snehi’s picture

@aneek Done as mentioned by you.
@Aneek if something is pending to be done. Please change the status to Needs Work this is for future.

aneek’s picture

@snehi, thanks for this fix.

BTW,

+++ b/core/lib/Drupal/Core/EventSubscriber/HttpExceptionSubscriberBase.php
@@ -56,7 +56,7 @@
-   *   attempt ot process,such as "html" or "json". Returning an empty array
+   *   attempt to process, such as "html" or "json". Returning an empty array

Can we have a interdiff? Not mandatory though!

Thanks.

snehi’s picture

FileSize
243 bytes

PFA interdiff.

dawehner’s picture

Component: other » documentation
Assigned: aneek » Unassigned
Status: Needs review » Reviewed & tested by the community
Issue tags: +rc eligible

Seems fine for me

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed 04fc960 and pushed to 8.0.x. Thanks!

  • alexpott committed 04fc960 on 8.0.x
    Issue #2589839 by snehi, joshi.rohit100: Code comment typo in...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.