Skip to content

Commit

Permalink
Merge branch 'master' of github.com:homer6/sfAltumoPlugin
Browse files Browse the repository at this point in the history
  • Loading branch information
thatjuan committed May 5, 2012
2 parents 2bfefe1 + 73e9a00 commit cd85798
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions lib/Api/ApiRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,12 @@ public function getMessageBody(){

}

//this allows a single object to be passed. this allows people that use the api
//to not have to wrap a single object in an array
if( isset($base_object_modifications[0]) && !is_array($base_object_modifications[0]) ){
// This allows a single object to be passed. Peope who use the API
// to post/put a single object don't have to wrap it in an array
$base_object_keys = array_keys( $base_object_modifications );
// if the first index is not numerical,
if ( ! empty($base_object_keys) && $base_object_keys[0] !== 0 ) {
// wrap modifications in another array
$base_object_modifications = array( $base_object_modifications );
}

Expand Down

0 comments on commit cd85798

Please sign in to comment.