safe unnecessary php_sapi_name() func call.

use builtin constant PHP_SAPI instead.
This commit is contained in:
Markus Staab
2017-08-02 15:10:43 +02:00
committed by GitHub
parent b8e9e68715
commit 521565a485
+1 -1
View File
@@ -151,7 +151,7 @@ class PrettyPageHandler extends Handler
if (!$this->handleUnconditionally()) {
// Check conditions for outputting HTML:
// @todo: Make this more robust
if (php_sapi_name() === 'cli') {
if (PHP_SAPI === 'cli') {
// Help users who have been relying on an internal test value
// fix their code to the proper method
if (isset($_ENV['whoops-test'])) {