Closed (fixed)
Project:
Migrate
Version:
7.x-2.x-dev
Component:
Code
Priority:
Minor
Category:
Bug report
Assigned:
Reporter:
Created:
9 Nov 2012 at 13:19 UTC
Updated:
26 Nov 2012 at 23:21 UTC
Jump to comment: Most recent file
Hi,
I have noticed an issue with the activeUrl() function in the MigrateSourceXML class (xml.inc). The current function checks the activeUrl attribute in an if statement as follows:
public function activeUrl() {
if ($this->activeUrl) {
return $this->sourceUrls[$this->activeUrl];
}
}
The problem arises importing XML from multiple files if you need to get the URI of the first file, at index 0. PHP treats 0 as FALSE so the sourceUrl will never be returned for this file.
To fix this, we simply need to change the if statement to check explicitly for NULL rather than the truth value of $this->activeUrl.
Patch incoming.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | activeurl-1836426-1.patch | 412 bytes | edb |
Comments
Comment #1
edb commentedPatch attached
Comment #2
mikeryanCommitted, thanks!