diff options
author | plegall <plg@piwigo.org> | 2011-05-30 21:38:53 +0000 |
---|---|---|
committer | plegall <plg@piwigo.org> | 2011-05-30 21:38:53 +0000 |
commit | 301b652fcbb323971987dc9b760816f81236f292 (patch) | |
tree | 5316fb4a071a9ecf22d49a2d018e7ec2202ee3c6 | |
parent | 5159af4e099dbff55f99a3857234e1fee9617a50 (diff) |
merge r11117 from branch 2.2 to trunk
bug 2299 fixed: web API, method pwg.images.addSimple returns a clean error when parameter "image" is missing
git-svn-id: http://piwigo.org/svn/trunk@11118 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r-- | include/ws_functions.inc.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/ws_functions.inc.php b/include/ws_functions.inc.php index a60dfc01e..16d2f7dd4 100644 --- a/include/ws_functions.inc.php +++ b/include/ws_functions.inc.php @@ -1423,6 +1423,11 @@ function ws_images_addSimple($params, &$service) { return new PwgError(405, "This method requires HTTP POST"); } + + if (!isset($_FILES['image'])) + { + return new PwgError(405, "The image (file) parameter is missing"); + } $params['image_id'] = (int)$params['image_id']; if ($params['image_id'] > 0) |