Contribution Date
Technology
Contribution Project
Contribution Details
@kevinquillen I am a bit confused here. How will we determine if the current environment is production?
Also, shouldn't the 'enable' configuration be enough in this use case? Users can change that configuration for the production environment themselves or even keep the module entirely disabled in production.
This logic ensures Ignition doesn't get registered if it hasn't been marked as enabled.
$config = $this->configFactory->get('ignition.settings');
$ignition_enabled = $config->get('enabled');
if ($ignition_enabled != TRUE || !$this->account->hasPermission('view ignition error page')) {
return;
}
Also, I have added this logic for now but it just returns a blank page and might create problems in case the website wants to show a custom themed error page.
\Spatie\Ignition\Ignition::make()
->shouldDisplayException($inLocalEnvironment)
->register();
Issue Status
Needs Review
Contribution Issue Link
Contribution Link
Files count
0
Patches count
0