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

config->site_url() optimizations #2048

Merged
merged 2 commits into from
Dec 3, 2012
Merged

config->site_url() optimizations #2048

merged 2 commits into from
Dec 3, 2012

Conversation

vlakoff
Copy link
Contributor

@vlakoff vlakoff commented Dec 3, 2012

  • direct access to config array, instead of item() calls
  • the string cast is just in case 'url_suffix' would be set to false or null; the function produces the same results without this cast, but it leads to a robuster code, as false and null are sanitized and skip the suffix insertion code
  • altered conditional structure: if no suffix, skip the appending of an empty string to $uri

- direct access to config array, instead of item() calls
- the string cast is just in case 'url_suffix' would be set to false or null; the function produces the same results without this cast, but it leads to a robuster code, as false and null are sanitized and skip the suffix insertion code
- altered conditional structure: if no suffix, skip the appending of an empty string to $uri
@narfbg
Copy link
Contributor

narfbg commented Dec 3, 2012

isset() returns FALSE for NULL while boolean values doesn't make any sense - nobody would have that. You don't need the typecast. :)

@vlakoff
Copy link
Contributor Author

vlakoff commented Dec 3, 2012

Good catch, I overlooked isset(null). Updated pull request.

narfbg added a commit that referenced this pull request Dec 3, 2012
config->site_url() optimizations
@narfbg narfbg merged commit 6a38949 into bcit-ci:develop Dec 3, 2012
nonchip pushed a commit to nonchip/CodeIgniter that referenced this pull request Jun 29, 2013
config->site_url() optimizations
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.

2 participants