Doesn't fetch any data

Bug #831656 reported by Hugh Guiney
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
php_musicbrainz
Undecided
Unassigned

Bug Description

This applies to both the 2.x branch and the 1.x branch. Using 2.x for the examples.

My code:

try{
 $mbQuery = new mbQuery();
 $trackFilters = new mbTrackFilter();
 $trackFilters->title('…Baby One More Time');
 $trackFilters->artistName('Britney Spears');
 $trackFilters->limit('5');
 var_dump($mbQuery->getTracks($trackFilters));
} catch(mbRequestError $e) {
 echo $e->getMessage();
} catch(mbResponseError $e) {
 echo $e->getMessage();
} catch(Exception $e) {
 echo $e->getMessage();
}

Log:

PHP Warning: require_once(mbCdStub.php): failed to open stream: No such file or directory in /path/to/mbQuery.php on line 53
PHP Fatal error: require_once(): Failed opening required 'mbCdStub.php'
PHP Warning: require_once(mbUser.php): failed to open stream: No such file or directory
PHP Fatal error: require_once(): Failed opening required 'mbUser.php'

Renamed mbCdstub.php to mbCdStub.php; copied mbUser.php from the 1.x branch to 2.x; and these went away, but then I got:

PHP Notice: Undefined index: HTTP_status in /path/to/mbWebService.php on line 154
PHP Warning: xml_error_string() expects parameter 1 to be long, resource given in /path/to/xml/xmlParser.php on line 106

Second error was fixed by changing:

$this->_last_error = xml_get_current_line_number($this->_parser) . ": ". xml_error_string($this->_parser);

to:

$this->_last_error = xml_get_current_line_number($this->_parser) . ": ". xml_error_string(xml_get_error_code($this->_parser));

But the first one still remains. Additionally, the outputted XML error is:

1: Not well-formed (invalid token)

Can this please be fixed? I can't find any other MusicBrainz 2 PHP libraries.

description: updated
description: updated
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers