Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. FlattenException.php

function FlattenException::setMessage

Return value

$this

File

vendor/symfony/error-handler/Exception/FlattenException.php, line 228

Class

FlattenException
FlattenException wraps a PHP Error or Exception to be able to serialize it.

Namespace

Symfony\Component\ErrorHandler\Exception

Code

public function setMessage(string $message) : static {
    if (str_contains($message, "@anonymous\x00")) {
        $message = preg_replace_callback('/[a-zA-Z_\\x7f-\\xff][\\\\a-zA-Z0-9_\\x7f-\\xff]*+@anonymous\\x00.*?\\.php(?:0x?|:[0-9]++\\$)?[0-9a-fA-F]++/', fn($m) => class_exists($m[0], false) ? ((get_parent_class($m[0]) ?: key(class_implements($m[0]))) ?: 'class') . '@anonymous' : $m[0], $message);
    }
    $this->message = $message;
    return $this;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal