mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-10-31 06:02:00 +01:00
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
This commit is contained in:
1 parent
5159af4e09
commit
301b652fcb
1 file changed
+5
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user