diff --git a/system/core/Config.php b/system/core/Config.php index 245f44bb2..761441233 100644 --- a/system/core/Config.php +++ b/system/core/Config.php @@ -335,7 +335,7 @@ class CI_Config { */ public function local_url($uri = '', $protocol = NULL) { - $local_url = $this->slash_item('local_url'); + $local_url = $this->slash_item('local_url') ?? $this->slash_item('base_url'); if (isset($protocol)) { // For protocol-relative links diff --git a/system/helpers/url_helper.php b/system/helpers/url_helper.php index 89e90b588..8b2eb1806 100644 --- a/system/helpers/url_helper.php +++ b/system/helpers/url_helper.php @@ -106,7 +106,7 @@ if ( ! function_exists('local_url')) function local_url($uri = '', $protocol = NULL) { - return get_instance()->config->local_url($uri, $protocol) ?? get_instance()->config->base_url($uri, $protocol); + return get_instance()->config->local_url($uri, $protocol); } }