Closed (fixed)
Project:
Domain
Version:
5.x-1.0
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
28 Feb 2008 at 16:12 UTC
Updated:
26 Mar 2008 at 01:51 UTC
I just noticed that when I use the domain navigator as anonymous user the following error is logged
in httpd error_log. I do NOT see these errors when using domain navigator as authenticated user.
PHP Notice: Undefined index: path in ...../domain.module on line 507/508
Apart from errors, dropdown navigation for anonymous users seems ok.
I tried to clear caches on both sides, and cookies, to no effect.
This is with the original 5.x-1.0 Domain Nav
Comments
Comment #1
agentrickardUndefined index: is an E_ALL strict error message.
Drupal 5 does not require E_ALL strict error compliance, and DA does not check for it.
Comment #2
agentrickardSee http://drupal.org/node/34341
Comment #3
torgospizzaI can verify that this is happening on my installation as well. I've looked into it and did some testing and it turns out the 'path' element is not passed in the parse_url array when there is no path to return. (Actually, I found this to be true no matter where I attempted to navigate.) When I did a dump of the variable on a blank screen in PHP 5.1.2, this is what it returned:
Array ( [scheme] => http [host] => example.com )This appears to be due to the version of PHP. Older versions will pass the 'path' element regardless, whereas since version 4.4.7 it won't return anything. Please see this comment in the parse_url page of php.net: http://us3.php.net/manual/en/function.parse-url.php#77591
Most likely fix would be to check with isset() to see if path is being returned. That's also listed as a best practice in the page you linked to above.
EDIT: Of course, I fixed it somehow on my end, but I wanted to bring this to your attention regardless. Awesome work on this module!
Comment #4
agentrickardYes, but checking with isset() -- E_ALL strict compliance -- is not required in D5.
If you have a patch, I'll commit it, but I'm not spending time on this.
Comment #5
agentrickardThe issue is actually not in Domain Nav. It's in the main module. Domain Nav just causes it to appear frequently.
Is this the fix?
Comment #6
agentrickardFixed and committed.
Comment #7
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.