ZF-9644: Not all instances are returned by describe()


When trying to call ->describe() with two instance IDs in an array, I only get info of 1 instance in the response, despite the fact that the response XML from EC2 contains both instances I've asked for. Both instances are up and running.

The code I'm using:

$info = $instance->describe(
   array('i-16cd7c61', 'i-14cd7c63')

var_dump($info, $instance->getHttpClient()->getLastResponse()->getBody());

and the output:

array(1) {
  array(1) {
    array(17) {
      string(10) "r-304dec47"
      string(12) "--deleted--"
      array(1) {
        string(9) "zs-node01"
      string(10) "i-14cd7c63"
      string(12) "ami-d78ea5a3"
      array(2) {
        string(2) "16"
        string(7) "running"
      string(43) ""
      string(48) ""
      string(7) "pokus01"
      string(0) ""
      string(8) "m1.small"
      string(24) "2010-04-09T19:27:04.000Z"
      string(10) "eu-west-1b"
      string(12) "aki-02486376"
      string(0) ""
      string(1) "1"
      string(8) "disabled"
string(3475) "<?xml version="1.0"?>

Note how the dumped array only shows one instance, but the XML contains both.


Attached is a dead-simple patch against rev. 21805 which seems to solve the problem, at least for my use case. Not sure it's the right way.

Fixed in r22046