Zend Framework

Service_Amazon_Item not return valid Track (TRAC#136)

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Duplicate
  • Affects Version/s: 0.1.3
  • Fix Version/s: 0.7.0
  • Component/s: Zend_Service_Amazon
  • Labels:
    None

Description

Zend_Service_Amazon_Item doesn't return valid Tracks node values. I made a patch for current 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);

Activity

Hide
Jayson Minard added a comment -

patch needs confirmed, CLA check, and applied

Show
Jayson Minard added a comment - patch needs confirmed, CLA check, and applied
Hide
Darby Felton added a comment -

Duplicates ZF-82

Show
Darby Felton added a comment - Duplicates ZF-82
Hide
Wil Sinclair added a comment -

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

Show
Wil Sinclair added a comment - Bookkeeping. Closing old issues and assigning them to the person who ultimately resolved the issue.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: