mirror of
https://github.com/filp/whoops.git
synced 2026-09-03 05:57:12 +00:00
safe unnecessary php_sapi_name() func call.
use builtin constant PHP_SAPI instead.
This commit is contained in:
@@ -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'])) {
|
||||
|
||||
Reference in New Issue
Block a user