Welcome Guest, Not a member yet? Register   Sign In
Conflict with site_url() in Codeigniter vs Wordpress
#1

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
Reply
#2

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
Reply




Theme © iAndrew 2016 - Forum software by © MyBB