Skip to content

Adding Environments #9242

@okatse

Description

@okatse

class ExceptionHandler Line 78

            if (! str_contains($request->getHeaderLine('accept'), 'text/html')) {
                $data = (ENVIRONMENT === 'development' || ENVIRONMENT === 'testing')
                    ? $this->collectVars($exception, $statusCode)
                    : '';

If I add a new environment, this piece of code causes data trimming. Could this be modularized ?
Example :

           $som_config = new \Config\App();

            if (! str_contains($request->getHeaderLine('accept'), 'text/html')) {
                $data = (in_array(ENVIRONMENT, $som_config->som_env))
                    ? $this->collectVars($exception, $statusCode)
                    : '';

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugVerified issues on the current code behavior or pull requests that will fix them

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions