Permalink
Browse files

search calls actually expect an array, not string

  • Loading branch information...
1 parent c844a60 commit ddf3affad53024d7a1660ce6995105091b2bd657 @randomecho committed Oct 18, 2012
Showing with 7 additions and 3 deletions.
  1. +7 −3 modules/petfinder/classes/petfinder.php
@@ -145,7 +145,7 @@ public static function single($pet_id)
/**
* Generate the random API return with optional parameters to narrow the random selection
*
- * @param string API search parameters
+ * @param array API search parameters
* @return array
* @uses Petfinder::connect
* @uses Petfinder::pet_vars
@@ -161,6 +161,10 @@ public static function random($filter = '')
$filter = '&'.implode('&', $filter_keys);
}
+ else
+ {
+ $filter = '';
+ }
$response = Petfinder::connect('pet.getRandom', '&output=full'.$filter);
@@ -172,7 +176,7 @@ public static function random($filter = '')
/**
* Sends for and returns results for searching pets
*
- * @param string API search parameters
+ * @param array API search parameters
* @return array
* @uses Kohana::$config
* @uses Petfinder::search
@@ -201,7 +205,7 @@ public static function search_pets($filter = '')
/**
* Sends for and returns results for searching shelters
*
- * @param string API search parameters
+ * @param array API search parameters
* @return array
* @uses Kohana::$config
* @uses Petfinder::search

0 comments on commit ddf3aff

Please sign in to comment.