Issues

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

Issue Type: Bug Created: 2006-06-20T23:28:33.000+0000 Last Updated: 2008-12-19T13:46:18.000+0000 Status: Closed Fix version(s): - 0.9.2 (06/Apr/07)

Reporter: Naoto Ishikawa (ishinao) Assignee: Darby Felton (darby) Tags: - Zend_Service_Amazon

Related issues: Attachments:

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.

<pre class="highlight">
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

Posted by Darby Felton (darby) on 2006-07-24T13:17:28.000+0000

Original comment by Jayson Minard;

patch needs confirmed, CLA check, and applied

Posted by Bill Karwin (bkarwin) on 2006-11-13T15:19:04.000+0000

Changing fix version to unknown.

Posted by Darby Felton (darby) on 2007-03-28T16:14:29.000+0000

Wrapped the patch with ``` tags.

Posted by Darby Felton (darby) on 2007-04-04T17:38:41.000+0000

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.

Posted by Wil Sinclair (wil) on 2008-12-19T13:46:18.000+0000

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

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts