diff --git a/restapi/index.php b/restapi/index.php index 2dd729fcb..1aca291b6 100644 --- a/restapi/index.php +++ b/restapi/index.php @@ -699,7 +699,7 @@ function uploadDocumentFile($documentId) { /* {{{ */ return; } - if(!ctype_digit($document) || $documentId == 0) { + if(!ctype_digit($documentId) || $documentId == 0) { $app->response()->header('Content-Type', 'application/json'); echo json_encode(array('success'=>true, 'message'=>'id is 0', 'data'=>'')); return;