Every drupal page reports :-
PHP Notice: Undefined index: path in /home/drupal/drupal/includes/bootstrap.inc on line 161
Fixed with this:-
--- bootstrap.inc.orig Fri Apr 21 07:39:00 2006
+++ bootstrap.inc Wed Apr 26 10:35:35 2006
@@ -158,7 +158,7 @@ function conf_init() {
$parts = parse_url($base_url);
$base_path = isset($parts['path']) ? $parts['path'] . '/' : '/';
// Build $base_root (everything until first slash after "scheme://").
- $base_root = substr($base_url, 0, strlen($base_url) - strlen($parts['path']));
+ $base_root = substr($base_url, 0, strlen($base_url) - strlen($base_path));
}
else {
// Create base URL
--AjK
Comment | File | Size | Author |
---|---|---|---|
#3 | bootstrap_19.patch | 816 bytes | JonBob |
Comments
Comment #1
Tobias Maier CreditAttribution: Tobias Maier commentedComment #2
AjK CreditAttribution: AjK commentedThe above patch for removing this PHP warning was incorrect.
Here is the code method:-
--AjK
Comment #3
JonBob CreditAttribution: JonBob commentedHere's a patch to fix the cause of the error rather than suppressing the error.
I think this is rather important to fix, as it happens before our error handler is installed, so the error may be echoed to the browser in certain configurations.
Comment #4
drummI decided that an if statemkent was better than a ternanry operaor in this case.
Comitted to HEAD.
Comment #5
(not verified) CreditAttribution: commented