v4.3.1: Bug in site_url() ? |
Hello CI community,
first of all, thanks for your effort, you put into this great framework. I love using it. :-) After the update from v4.2.12 to v4.3.1, there is a strange behavior with the url helper "site_url()". In Config/App.php I set the hostname of my site: www.mydomain.com Then I created Config/AppEvents.php with the hostname events.mydomain.com And according to the documentation (https://codeigniter.com/user_guide/helpe...l#site_url), it is possible to set a third parameter for an alternate configuration. So I did this: site_url('coolurl/eventname/whatever', null, config('AppEvents')) And in v4.2 the result was "https://events.mydomain.com/coolurl/eventname/whatever". That worked so far. But in v4.3 the result is "https://www.mydomain.com/coolurl/eventname/whatever". So it seems that the alternate configuration is not used anymore. Did I miss aynthing? I'm deeply confused. :-D Any help would be appreciated. Thanks in advance.
Thanks for the fast help. Your solution works. :-)
Is it best practice, if I implement your solution as a custom helper (app folder), that overrides the default helper methods? Or should I wait until a new release comes out? What do you recommend? |
Welcome Guest, Not a member yet? Register Sign In |