Zend Framework

getMetricStatistics() does not support the "Dimensions" option parameter properly

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.9.2, 1.9.4
  • Fix Version/s: 1.9.6
  • 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.

Activity

Hide
Larry Root added a comment -

Stack trace of failed getMetricStatistics call

Show
Larry Root added a comment - Stack trace of failed getMetricStatistics call
Hide
Jon Whitcraft added a comment -

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

Show
Jon Whitcraft added a comment - This has been completed with r19066 and merged into the release branch with r19067

People

Vote (1)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved: