Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

debug = false not worked as expected #152

Closed
swimitup opened this issue Sep 26, 2022 · 5 comments
Closed

debug = false not worked as expected #152

swimitup opened this issue Sep 26, 2022 · 5 comments

Comments

@swimitup
Copy link

If you try to disable debug mode to not show code or more details on-screen when you got an error 500, the .env

APP_DEBUG=false

or instruction

app()->config('debug',false)

will not prevent the nice debug screen to show up.

Screen Shot 2022-09-26 at 2 18 30 PM

@swimitup
Copy link
Author

Code

app()->config(['debug' => false]);

will not work either.

@swimitup
Copy link
Author

If you set debug to false in _app.php, for example, and var_dump the variable, you will get false. But if you try to var_dump the variable inside App.php class, you will get true:

Screen Shot 2022-09-26 at 2 31 43 PM

/Users/julian/uc-api/vendor/leafs/leaf/src/App.php:73:boolean true

@swimitup
Copy link
Author

It seems the "debug" variable is not controlled by the Config::static:$settings array, but from within the /config/app.php script:

Screen Shot 2022-09-26 at 3 15 47 PM

But still if you define the variable afterwards, in _app.php script, it will not work:

Leaf\Config::set([
    "views.path" => "views",
    "views.cachePath" => "views/cache",
    'log.style' => 'linux',
    'log.enabled' => true,
    'log.dir' => __DIR__ . '/../../storage/logs/',
    'log.file' => 'uc-api-'.date('Y-m-d').'.log',
    'debug' => false,
]);

@mychidarko
Copy link
Member

I'll take a look at this

This was referenced Oct 3, 2022
@mychidarko
Copy link
Member

@swimitup This has been fixed in Leaf's new release. You can run composer update in your project to get rid of this error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants