$base_url = ''; in settings.php should be possible without notice warnings | Drupal 7.65

Created on 8 April 2019, over 5 years ago
Updated 2 April 2023, over 1 year ago

$base_url = ''; in settings.php should be possible without notice warnings(Notice: Undefined offset: 1 in drupal_settings_initialize() (line 802 of ..\includes\bootstrap.inc)

In settings.php file, i have put blank value for $base_url, now, i am getting notice error on overall site.

Previously, site was working fine, with absolute url in setting.php, for some reason i have to keep blank value of $base_url.

Previous setting in setting.php: $base_url = 'http://local.sunil.com/'; (working fine.)

Current setting in setting.php: $base_url=''; (getting notice error).

💬 Support request
Status

Closed: won't fix

Version

7.0 ⚰️

Component
Bootstrap 

Last updated 23 days ago

No maintainer
Created by

🇮🇳India sunil singh

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇮🇹Italy apaderno Brescia, 🇮🇹
  • Status changed to Closed: won't fix over 1 year ago
  • 🇸🇰Slovakia poker10

    I do not think this is a bug. Documentation of the $base_path variable in default.settings.php states:

    /**
    * Base URL (optional).
    *
    * If Drupal is generating incorrect URLs on your site, which could
    * be in HTML headers (links to CSS and JS files) or visible links on pages
    * (such as in menus), uncomment the Base URL statement below (remove the
    * leading hash sign) and fill in the absolute URL to your Drupal installation.
    *
    * You might also want to force users to use a given domain.
    * See the .htaccess file for more information.
    *
    * Examples:
    * $base_url = 'http://www.example.com';
    * $base_url = 'http://www.example.com:8888';
    * $base_url = 'http://www.example.com/drupal';
    * $base_url = 'https://www.example.com:8888/drupal';
    *
    * It is not allowed to have a trailing slash; Drupal will add it
    * for you.
    */
    # $base_url = 'http://www.example.com'; // NO trailing slash!

    See: ...fill in the absolute URL to your Drupal installation.... Empty string is not a valid value for this variable.

Production build 0.71.5 2024