From c1edbc08bb31f785b58de29f21fbdd6afdd2e223 Mon Sep 17 00:00:00 2001 From: "Konstantin.Myakshin" Date: Fri, 4 Mar 2016 15:04:09 +0200 Subject: [PATCH] Use constant instead of function call. --- src/Symfony/Component/Debug/Debug.php | 2 +- src/Symfony/Component/HttpFoundation/Request.php | 2 +- .../Component/HttpKernel/DataCollector/ConfigDataCollector.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Symfony/Component/Debug/Debug.php b/src/Symfony/Component/Debug/Debug.php index fd09982edf..82014e4ad4 100644 --- a/src/Symfony/Component/Debug/Debug.php +++ b/src/Symfony/Component/Debug/Debug.php @@ -44,7 +44,7 @@ class Debug error_reporting(-1); ErrorHandler::register($errorReportingLevel, $displayErrors); - if ('cli' !== php_sapi_name()) { + if ('cli' !== PHP_SAPI) { ExceptionHandler::register(); // CLI - display errors only if they're not already logged to STDERR } elseif ($displayErrors && (!ini_get('log_errors') || ini_get('error_log'))) { diff --git a/src/Symfony/Component/HttpFoundation/Request.php b/src/Symfony/Component/HttpFoundation/Request.php index c93dddaf3f..b08a14ac3b 100644 --- a/src/Symfony/Component/HttpFoundation/Request.php +++ b/src/Symfony/Component/HttpFoundation/Request.php @@ -242,7 +242,7 @@ class Request // stores the Content-Type and Content-Length header values in // HTTP_CONTENT_TYPE and HTTP_CONTENT_LENGTH fields. $server = $_SERVER; - if ('cli-server' === php_sapi_name()) { + if ('cli-server' === PHP_SAPI) { if (array_key_exists('HTTP_CONTENT_LENGTH', $_SERVER)) { $server['CONTENT_LENGTH'] = $_SERVER['HTTP_CONTENT_LENGTH']; } diff --git a/src/Symfony/Component/HttpKernel/DataCollector/ConfigDataCollector.php b/src/Symfony/Component/HttpKernel/DataCollector/ConfigDataCollector.php index f58027e218..dfc83dcc35 100644 --- a/src/Symfony/Component/HttpKernel/DataCollector/ConfigDataCollector.php +++ b/src/Symfony/Component/HttpKernel/DataCollector/ConfigDataCollector.php @@ -70,7 +70,7 @@ class ConfigDataCollector extends DataCollector 'wincache_enabled' => extension_loaded('wincache') && ini_get('wincache.ocenabled'), 'zend_opcache_enabled' => extension_loaded('Zend OPcache') && ini_get('opcache.enable'), 'bundles' => array(), - 'sapi_name' => php_sapi_name(), + 'sapi_name' => PHP_SAPI, ); if (isset($this->kernel)) {