Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.6.0, 1.6.1, 1.6.2, 1.7.0, 1.7.1, 1.7.2, 1.7.3, 1.7.4
-
Fix Version/s: 1.7.6
-
Component/s: Zend_Service_Amazon
-
Labels:None
Description
Fetching tracklist from Amazon search is not working properly when product (album) has more than 1 disc.
require_once 'Zend/Service/Amazon/Query.php'; $query = new Zend_Service_Amazon_Query('XXXXXXXXXXXX','UK'); $query->Category('Blended')->Keywords("5036742001123")->ResponseGroup('Tracks,Small,Medium,ItemAttributes'); $results = $query->search(); Zend_Debug::dump($results->current()->Tracks);
outputs:
array(1) {
[""] => string(14) "Rock Tha House"
}
output should be:
array(2) {
[1] => array(11) {
[0] => string(12) "Ressurection"
[1] => string(6) "Creeps"
[2] => string(15) "White lightning"
[3] => string(14) "Check-out Time"
[4] => string(6) "Pacman"
[5] => string(9) "Reach out"
[6] => string(7) "Syringe"
[7] => string(14) "Rock Tha House"
[8] => string(5) "Greed"
[9] => string(10) "Flightpath"
[10] => string(8) "Fastlane"
}
[2] => array(13) {
[0] => string(6) "Creeps"
[1] => string(10) "Flightpath"
[2] => string(12) "Ressurection"
[3] => string(9) "Reach out"
[4] => string(7) "Syringe"
[5] => string(14) "Check out time"
[6] => string(15) "White lightning"
[7] => string(6) "Pacman"
[8] => string(5) "Greed"
[9] => string(11) "Bleep bleep"
[10] => string(12) "Kerb crawler"
[11] => string(8) "Fastlane"
[12] => string(14) "Rock Tha House"
}
}
To resolve this problem:
Line 156 in file Zend/Service/Amazon/Item.php is
$this->Tracks[$disk->getAttribute('number')] = (string) $t->data;
But it should be
$this->Tracks[$disk->getAttribute('Number')][] = (string) $t->data;
Assigning to Jon Whitcraft.