7
orijin
8y

Thought I'd share this gem with you. Overwriting a value by itself. Why would you even do this? It's not a single occurrence, but happens 3 times even in the same class.

Comments
  • 1
    u sure?

    to me it makes perfect sense setting a configvalue _named_ 'base_url' to whatever _value_ base_url() returns...
  • 0
    Well, my guess would be that base_url() returns value of that variable if it has been explicitly set. If not, then it tries to derive base URL from requested URL (which is not recommended way, but works most of the time as intended). Still, you'd get same value anyways, if somewhere this base_url isn't set to something else throughout code
  • 0
    @JohanO base_url() reads out the config value
Add Comment