Verified Commit 61ded0d7 authored by Dave Long's avatar Dave Long
Browse files

Merged 11.1.3.

parents 494df746 ad2a5613
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -9860,8 +9860,8 @@
    },
    "prefer-stable": true,
    "prefer-lowest": false,
    "platform": [],
    "platform-dev": [],
    "platform": {},
    "platform-dev": {},
    "platform-overrides": {
        "php": "8.3.0"
    },
+1 −0
Original line number Diff line number Diff line
@@ -747,6 +747,7 @@ protected function handleException(\Exception $e, $request, $type) {
    if ($e instanceof HttpExceptionInterface) {
      $response = new Response($e->getMessage(), $e->getStatusCode());
      $response->headers->add($e->getHeaders());
      $response->headers->set('Content-Type', 'text/plain');
      return $response;
    }

+4 −11
Original line number Diff line number Diff line
@@ -87,21 +87,14 @@ protected function getHandledFormats() {
   *   The event to process.
   */
  public function on4xx(ExceptionEvent $event) {
    if (($exception = $event->getThrowable()) && $exception instanceof HttpExceptionInterface) {
    // Avoid making a subrequest for 400 errors because the same conditions that
    // caused the 400 error could also happen in the subrequest. This allows 400
    // exceptions to fall through to FinalExceptionSubscriber::on4xx.
    if (($exception = $event->getThrowable()) && $exception instanceof HttpExceptionInterface && $exception->getStatusCode() > 400) {
      $this->makeSubrequest($event, '/system/4xx', $exception->getStatusCode());
    }
  }

  /**
   * Handles a 400 error for HTML.
   *
   * @param \Symfony\Component\HttpKernel\Event\ExceptionEvent $event
   *   The event to process.
   */
  public function on400(ExceptionEvent $event): void {
    throw $event->getThrowable();
  }

  /**
   * Handles a 401 error for HTML.
   *
+0 −12
Original line number Diff line number Diff line
@@ -20,18 +20,6 @@ public function __construct(protected array $includes) {

  }

  /**
   * Calls a function in the root namespace.
   *
   * __call() does not support references https://bugs.php.net/bug.php?id=71256
   * Because of this, ModuleHandler::getHookListeners() inlines this
   * method so it is not called anywhere in core.
   */
  public function __call($name, $args): mixed {
    $this->loadFile($name);
    return ('\\' . $name)(... $args);
  }

  /**
   * Loads the file a function lives in, if any.
   *
+1 −1
Original line number Diff line number Diff line
@@ -53,7 +53,7 @@ public function access($object, ?AccountInterface $account = NULL, $return_as_ob
    $result = $object->access('update', $account, TRUE);

    foreach ($this->getFieldsToUpdate() as $field => $value) {
      $result->andIf($object->{$field}->access('edit', $account, TRUE));
      $result = $result->andIf($object->{$field}->access('edit', $account, TRUE));
    }

    return $return_as_object ? $result : $result->isAllowed();
Loading