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

Breadcrumb

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

function Silencer::suppress

Suppresses given mask or errors.

Parameters

int|null $mask Error levels to suppress, default value NULL indicates all warnings and below.:

Return value

int The old error reporting level.

3 calls to Silencer::suppress()
Application::hintCommonErrors in vendor/composer/composer/src/Composer/Console/Application.php
HttpDownloader::getExceptionHints in vendor/composer/composer/src/Composer/Util/HttpDownloader.php
@internal
Silencer::call in vendor/composer/composer/src/Composer/Util/Silencer.php
Calls a specified function while silencing warnings and below.

File

vendor/composer/composer/src/Composer/Util/Silencer.php, line 33

Class

Silencer
Temporarily suppress PHP error reporting, usually warnings and below.

Namespace

Composer\Util

Code

public static function suppress(?int $mask = null) : int {
    if (!isset($mask)) {
        $mask = E_WARNING | E_NOTICE | E_USER_WARNING | E_USER_NOTICE | E_DEPRECATED | E_USER_DEPRECATED;
    }
    $old = error_reporting();
    self::$stack[] = $old;
    error_reporting($old & ~$mask);
    return $old;
}

API Navigation

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