Skip Menu |

This queue is for tickets about the XML-XML2JSON CPAN distribution.

Report information
The Basics
Id: 77573
Status: open
Priority: 0/

Owner: perl [...]
Requestors: BBYRD [...]

Bug Information
Severity: Normal
Broken in: 0.06
Fixed in: (no value)

Subject: No ref checking in _process_element_hash
Download (untitled) / with headers
text/plain 2.9k
_process_element_hash seems to wrongfully assume that $Obj is going to be a HASH ref, and that's not always the case: {"resp": {"status": true, "version": "2.0", "artist": {"profile": "Wouter DeBacker (born 21st of May, 1980), more commonly known by the stage name Gotye, is an ARIA Award-winning singer-songwriter. Born in Belgium but based in the Australian city of Melbourne, Gotye describes his work as \"about refiguring past things (old vinyl sounds) with my own ideas\".", "releases_url": "", "name": "Gotye", "groups": ["Basics, The"], "uri": "", "urls": ["", "", "", "", ""], "images": [{"uri": "", "height": 366, "width": 486, "resource_url": "", "type": "secondary", "uri150": ""}, {"uri": "", "height": 590, "width": 590, "resource_url": "", "type": "primary", "uri150": ""}, {"uri": "", "height": 304, "width": 420, "resource_url": "", "type": "secondary", "uri150": ""}, {"uri": "", "height": 543, "width": 450, "resource_url": "", "type": "secondary", "uri150": ""}, {"uri": "", "height": 750, "width": 500, "resource_url": "", "type": "secondary", "uri150": ""}], "resource_url": "", "aliases": ["Wally De Backer"], "id": 267609, "data_quality": "Needs Vote", "realname": "Wouter DeBacker"}}}loaded module: JSON at XML::XML2JSON::_init(/usr/local/share/perl/5.10.1/XML/ at XML::XML2JSON::new(/usr/local/share/perl/5.10.1/XML/ at main::artist_xml( at main::( ERROR: Can't use string ("") as a HASH ref while "strict refs" in use at /usr/local/share/perl/5.10.1/XML/ line 805. The problem area is here: "urls": ["", "", "", "", ""] Just because it's an ARRAY doesn't mean it's going to have HASHs inside. This should really turn into multiple <urls> tags.

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to