mirror of
https://github.com/filp/whoops.git
synced 2026-08-31 12:38:10 +00:00
PrettyPageHandler: helpful message for users of functionality removed in 98140ba
This commit is contained in:
@@ -90,6 +90,16 @@ class PrettyPageHandler extends Handler
|
||||
// Check conditions for outputting HTML:
|
||||
// @todo: make this more robust
|
||||
if(php_sapi_name() === 'cli') {
|
||||
|
||||
// Help users who have been relying on an internal test value
|
||||
// fix their code to the proper method
|
||||
if (isset($_ENV['whoops-test'])) {
|
||||
throw new \Exception(
|
||||
'Use handleUnconditionally instead of whoops-test'
|
||||
.' environment variable'
|
||||
);
|
||||
}
|
||||
|
||||
return Handler::DONE;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user