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

Some tiny fixes in Debugger #43

Merged
merged 5 commits into from
Sep 4, 2014
Merged

Some tiny fixes in Debugger #43

merged 5 commits into from
Sep 4, 2014

Conversation

rindeal
Copy link
Contributor

@rindeal rindeal commented Sep 4, 2014

No description provided.

TracyDebugger::$productionMode = self::DETECT;
} elseif ($mode == strtolower('production')) {
} elseif ($mode === 'production') {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That strtolower was definitely meant for $mode but your fix is too strict, maybe:

$mode = strtolower($config->get('system.debugger.mode'));

So you can then just do $mode == 'production'.

@rindeal
Copy link
Contributor Author

rindeal commented Sep 4, 2014

I wouldn't do those strtolower checks at all, if a user misconfigures his .yaml files then he might expect his configuration not to work. This hyper protectiveness only slows down the execution and Grav should be kept "Crazy Fast". The speed improvement in using === over == is described here, it's tiny but still something.

@rhukster
Copy link
Member

rhukster commented Sep 4, 2014

I'll discuss with the team, but your changes is probably fine. We're definitely interested in any and all optimizations. Every little bit helps and if you find any other things, even if they are minor, please submit other pull requests. It's great having a fresh pair of eyes on it. thanks!

rhukster added a commit that referenced this pull request Sep 4, 2014
@rhukster rhukster merged commit 0b0ce2e into getgrav:develop Sep 4, 2014
@rindeal rindeal deleted the hotfix/debugger-mode branch September 5, 2014 11:08
@rindeal rindeal restored the hotfix/debugger-mode branch September 5, 2014 13:22
@rindeal rindeal deleted the hotfix/debugger-mode branch September 5, 2014 13:25
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

Successfully merging this pull request may close these issues.

3 participants