From d622d1aa4f3b7c844de2f29cca2e04d9bb56bb86 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Wed, 23 Dec 2009 09:32:32 -0800 Subject: 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. --- modules/gallery/helpers/gallery_rest.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'modules/gallery/helpers/gallery_rest.php') 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() -- cgit v1.2.3