Issues

ZF-82: Service_Amazon_Item doesn't return valid information about Tracks.

Description

move from trac's ticket#136

Zend_Service_Amazon_Item doesn't return valid information about Tracks node. I made a patch for revision 593.


Zend/Service/Amazon/Item.php

*** Item.php.org        2006-06-09 10:31:19.000000000 +0900
--- Item.php    2006-06-09 22:48:08.000000000 +0900
***************
*** 123,138 ****
          }

          $result = $xpath->query('./az:Tracks/az:Disc', $dom);
!         if ($result->length > 1) {
              foreach ($result as $disk) {
!                 foreach ($xpath->query('./*/text()', $disk) as $t) {
!                     $this->Tracks[$disk->getAttribute('number')] = (string) $t->data;
                  }
              }
-         } else if ($result->length == 1) {
-             foreach ($xpath->query('./*/text()', $result->item(0)) as $t) {
-                 $this->Tracks[] = (string) $t->firstChild->data;
-             }
          }

          $result = $xpath->query('./az:Offers', $dom);
--- 123,134 ----
          }

          $result = $xpath->query('./az:Tracks/az:Disc', $dom);
!         if ($result->length) {
              foreach ($result as $disk) {
!                 foreach ($xpath->query('./az:Track', $disk) as $t) {
!                     $this->Tracks[$disk->getAttribute('Number')][$t->getAttribute('Number')] = (string) $t->firstChild->data;
                  }
              }
          }

          $result = $xpath->query('./az:Offers', $dom);

Comments

Original comment by Jayson Minard;

patch needs confirmed, CLA check, and applied

Changing fix version to unknown.

Wrapped the patch with ``` tags.

I believe this issue to have been resolved with SVN r4357. If this is not the case, please feel free to reopen with additional comment.

Bookkeeping. Closing old issues and assigning them to the person who ultimately resolved the issue.