ZF-8149: getMetricStatistics() does not support the "Dimensions" option parameter properly


When using the "Dimensions" parameter in the getMetricStatistics method, a warning is thrown and the call fails.

Example Call:

$return = $ec2_cw->getMetricStatistics(array(
                             'MeasureName' => 'CPUUtilization',
                             'Statistics' =>  array('Average'),
                             'Dimensions'=>   array('InstanceId'=>$instance),
                             'StartTime'=>    $period1Start,
                             'EndTime'=>      $period1End,

The warning thrown:

Warning: urlencode() expects parameter 1 to be string, array given in .../Zend/Service/Amazon/Ec2/Abstract.php on line 166

It seems to be choking on the fact that the 'Dimensions' config option is an associative array and the signParameters method within the abstract is not handling the condition.


Stack trace of failed getMetricStatistics call

This has been completed with r19066 and merged into the release branch with r19067