settings_custom_url.inc - Undefined index

Created on 18 December 2013, over 11 years ago
Updated 2 May 2025, about 1 month ago

Notice: Undefined index: path in domain_url_outbound_alter().

I realize this info is not relevant to this issue but since you asked:
php: 5.3.10
db: 5.5.33a-MariaDB-1~precise-log
Appears on all pages

I'm setting $domain['path'] = domain_get_path($domain); in hook_domain_load() but I was getting Notices when ['path'] wasn't set.

This fixes that for me $options['base_url'] = isset($path_lookup[$name]['path']) ? rtrim($path_lookup[$name]['path'], '/') : $GLOBALS['base_url'];

This isn't the cause of the Notice but wanted to at least bring it up:
There are times for me where $path is not set in
function domain_url_outbound_alter(&$path, &$options, $original_path) { ... }

I added $path = !empty($path) ? $path : $_GET['q']; so that when this is the case, setting $name = md5($path); there is a string being passed.

I've set up Domain Access so that it works across environments (dev/stage/prod). I have another patch I will post after this one (different topic) and maybe that will shed some more light as to why I may be getting this error. I will post a link here when I get it up in case it may be related.

πŸ› Bug report
Status

Closed: outdated

Version

3.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States scottalan

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.

Production build 0.71.5 2024