Merge pull request #516 from staabm/patch-1

safe unnecessary php_sapi_name() func call.
This commit is contained in:
Denis Sokolov
2017-08-03 12:43:23 +03:00
committed by GitHub
+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'])) {