The duplicate upload response data should be like this:
[CODE lang="json" title="Response"]{
"status_code": 400,
"error": {
"message": "Duplicated upload",
"code": 102,
"context": "Exception"
},
"request": {not disclosed for this purpose},
"status_txt": "Bad Request"
}[/CODE]
^ You can check that the demo issues this response.
Your website is giving this response data:
[CODE lang="json" title="Bad response"]{
"status_code": 400,
"error": {
"message": {},
"code": false,
"context": null
},
"request": {not disclosed for this purpose},
"status_txt": "Bad Request"
}[/CODE]
As you may notice, the error object has missing properties. Since demo runs the same version you are using, either your modifications are causing this or PHP 7.3 is giving issues here (I can't check that right now, I'm doing maintenance for my local machines). Tested PHP 7.3.4 without any issues.
If you want to try to check on your own keep reading.
The code that detects dupes:
[CODE lang="php" title="app/lib/classes/class.image.php"] // Detect duplicated uploads (all) by IP + MD5 (second layer)
if ($do_dupe_check && self::isDuplicatedUpload($image_upload['uploaded']['fileinfo']['md5'])) {
throw new Exception(_s('Duplicated upload'), 102);
}[/CODE]
The exception thrown by the code above is turned into a error response:
[CODE lang="php" title="app/routes/route.json.php"] $json_array = G\json_error($e);
$json_array['request'] = $_REQUEST;
G\Render\json_output($json_array);[/CODE]
From there, is G\Render\json_output() which handles the response.