When running drupal in PHP 5.3, purl is throwing undefined index notices when doing purl_domain rewrites:

Notice: Undefined index: path in purl_domain->rewrite() (line 55 of /drupal/sites/all/modules/contrib/purl/includes/purl_domain.inc).

The php parse_url function does not set keys for url elements that are not present, and in this case if you are viewing the site root, there is not path element present.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mikemccaffrey’s picture

Status: Active » Needs review
FileSize
648 bytes

Patch attached.

bblake’s picture

Thanks for the patch. There wasn't anything wrong with it, but I re-rolled one to match the syntax of how that path checking happens in the subdomain include. Can you take a look and verify that this still fixes the issue and works correctly for you?

arosboro’s picture

Status: Needs review » Reviewed & tested by the community

I had this issue and came to the same solution. This patch works for my use case.

bblake’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for the help. I've committed the patch in #2.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

joelwallis’s picture

Issue summary: View changes
Status: Closed (fixed) » Active

I just stumpled upon this issue and I can see that you guys already solved this, and commited to the branch 7.x-1.x (see the commit a9ef21c). But you haven't released this on a new PURL version.

Also, the 7.x-1.0-beta1 is there for almost three years, and there are seven paths commited after this version. Why there's no -beta2 release yet? The latest commit was made 2 years ago. Is this module abandoned?

brunorios1’s picture

+1

I just stumpled upon this issue and I can see that you guys already solved this, and commited to the branch 7.x-1.x (see the commit a9ef21c). But you haven't released this on a new PURL version.

Also, the 7.x-1.0-beta1 is there for almost three years, and there are seven paths commited after this version. Why there's no -beta2 release yet? The latest commit was made 2 years ago. Is this module abandoned?