Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

search calls actually expect an array, not string

  • Loading branch information...
commit ddf3affad53024d7a1660ce6995105091b2bd657 1 parent c844a60
@randomecho authored
Showing with 7 additions and 3 deletions.
  1. +7 −3 modules/petfinder/classes/petfinder.php
View
10 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
Please sign in to comment.
Something went wrong with that request. Please try again.