[eluser]ebynum[/eluser]
My path to discovering this "problem" was fairly strange, so I'll elaborate a bit.
I am working on a site that has a CI installation in the web root and a WordPress blog installed in the /blog folder. In order to use the WordPress "Loop" to display posts and other information within the CI context, we include the WP "header" into the index.php file that is running CI with:
require('blog/wp-blog-header.php');
WP does a lot of things, including defining a site_url() function that serves the same purpose as CI's site_url() function, but which points to the site_url for the WP install (in this case, /blog).
The problem that I discovered as a result is this:
form_helper.php makes reference to the site_url in several locations, including form open. It uses $CI->config->site_url() to build its site_url() relative links.
url_helper.php defines the site_url() function (if it can), and then uses it internally instead of just referring to $CI->config->site_url(), even though all of the relevant functions (redirect and anchor in particular) are already pulling a reference to $CI.
Is there any good reason for the definition of (and internal use of) site_url() in the url_helper helper?