Conflict with site_url() in Codeigniter vs Wordpress - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: Best Practices (https://forum.codeigniter.com/forumdisplay.php?fid=12) +--- Thread: Conflict with site_url() in Codeigniter vs Wordpress (/showthread.php?tid=71382) |
Conflict with site_url() in Codeigniter vs Wordpress - geirarnesen - 08-08-2018 I've an app tightly integrated with Wordpress, - using the Wordpress authentication solution. After upgrading from 3.1.6 -> 3.1.9 I got conflict with site_url() in Codeigniter PHP Fatal error: Cannot redeclare site_url() (previously declared in /home/abfotqpq/public_html/konkurranser/system/helpers/url_helper.php:64) in /home/abfotqpq/public_html/wp-includes/link-template.php on line 2990 I commented out the function in url_helper which helped me. Any better solution ? Rgds Geir RE: Conflict with site_url() in Codeigniter vs Wordpress - Pertti - 08-08-2018 Not sure why it would only appear after upgrade, but looks like both CodeIgniter and WordPress use site_url function. Maybe don't load URL helper and use WP version, seems to do pretty much same thing - https://codex.wordpress.org/Function_Reference/site_url |