Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.9.2, 1.9.4
-
Fix Version/s: 1.9.6
-
Component/s: Zend_Service_Amazon_Ec2
-
Labels:None
Description
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