diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2009-12-23 09:32:32 -0800 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2009-12-23 09:32:32 -0800 |
commit | d622d1aa4f3b7c844de2f29cca2e04d9bb56bb86 (patch) | |
tree | 1c1b0a2a93b95d791d6807b622fac950bdf9064d /modules/gallery/helpers | |
parent | b8ee6f25bdd9372dccd4552ca29cf6f2857e8164 (diff) |
Updated the unit tests to match the current API
Corrected a problem identified with the unit tests... failed if the path was empty on PUT.
Diffstat (limited to 'modules/gallery/helpers')
-rw-r--r-- | modules/gallery/helpers/gallery_rest.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/gallery/helpers/gallery_rest.php b/modules/gallery/helpers/gallery_rest.php index a3b1997d..a052ae64 100644 --- a/modules/gallery/helpers/gallery_rest.php +++ b/modules/gallery/helpers/gallery_rest.php @@ -58,6 +58,10 @@ class gallery_rest_Core { } static function put($request) { + if (empty($request->path)) { + return rest::invalid_request(); + } + $item = ORM::factory("item") ->where("relative_url_cache", $request->path) ->viewable() |