Skip to content

Commit da6665a

Browse files
Fixed issue in APIResponse.inc that prevent the default error response from being set
1 parent f212b0e commit da6665a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

pfSense-pkg-API/files/etc/inc/api/framework/APIResponse.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1934,7 +1934,7 @@ function get($id, $data=[], $all=false) {
19341934

19351935

19361936
];
1937-
$response = $responses[(!in_array($id, $responses)) ? $id : 1];
1937+
$response = $responses[(!array_key_exists($id, $responses)) ? $id : 1];
19381938
$response["data"] = $data;
19391939
if ($all === true) {
19401940
$response = $responses;

0 commit comments

Comments
 (0)