Skip to content

Commit 5b84b56

Browse files
Fixed issue where http_response_code() would not properly return value
1 parent 86bd2eb commit 5b84b56

60 files changed

Lines changed: 411 additions & 411 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

pfSense-pkg-API/files/etc/inc/apicalls.inc

Lines changed: 293 additions & 293 deletions
Large diffs are not rendered by default.

pfSense-pkg-API/files/usr/local/www/api/v1/firewall/aliases/add/address/index.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66
# RUN API CALL
77
$resp = api_firewall_aliases_add_address();
88
http_response_code($resp["code"]);
9-
echo $resp;
10-
exit();
9+
echo json_encode($resp) . PHP_EOL;
10+
exit();

pfSense-pkg-API/files/usr/local/www/api/v1/firewall/aliases/add/index.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66
# RUN API CALL
77
$resp = api_firewall_aliases_add();
88
http_response_code($resp["code"]);
9-
echo $resp;
10-
exit();
9+
echo json_encode($resp) . PHP_EOL;
10+
exit();

pfSense-pkg-API/files/usr/local/www/api/v1/firewall/aliases/delete/address/index.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66
# RUN API CALL
77
$resp = api_firewall_aliases_delete_address();
88
http_response_code($resp["code"]);
9-
echo $resp;
10-
exit();
9+
echo json_encode($resp) . PHP_EOL;
10+
exit();

pfSense-pkg-API/files/usr/local/www/api/v1/firewall/aliases/delete/index.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66
# RUN API CALL
77
$resp = api_firewall_aliases_delete();
88
http_response_code($resp["code"]);
9-
echo $resp;
10-
exit();
9+
echo json_encode($resp) . PHP_EOL;
10+
exit();

pfSense-pkg-API/files/usr/local/www/api/v1/firewall/aliases/index.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66
# RUN API CALL
77
$resp = api_firewall_aliases();
88
http_response_code($resp["code"]);
9-
echo $resp;
10-
exit();
9+
echo json_encode($resp) . PHP_EOL;
10+
exit();

pfSense-pkg-API/files/usr/local/www/api/v1/firewall/aliases/modify/index.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66
# RUN API CALL
77
$resp = api_firewall_aliases_modify();
88
http_response_code($resp["code"]);
9-
echo $resp;
10-
exit();
9+
echo json_encode($resp) . PHP_EOL;
10+
exit();

pfSense-pkg-API/files/usr/local/www/api/v1/firewall/rules/add/index.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66
# RUN API CALL
77
$resp = api_firewall_rules_add();
88
http_response_code($resp["code"]);
9-
echo $resp;
10-
exit();
9+
echo json_encode($resp) . PHP_EOL;
10+
exit();

pfSense-pkg-API/files/usr/local/www/api/v1/firewall/rules/delete/index.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66
# RUN API CALL
77
$resp = api_firewall_rules_delete();
88
http_response_code($resp["code"]);
9-
echo $resp;
10-
exit();
9+
echo json_encode($resp) . PHP_EOL;
10+
exit();

pfSense-pkg-API/files/usr/local/www/api/v1/firewall/rules/index.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66
# RUN API CALL
77
$resp = api_firewall_rules();
88
http_response_code($resp["code"]);
9-
echo $resp;
10-
exit();
9+
echo json_encode($resp) . PHP_EOL;
10+
exit();

0 commit comments

Comments
 (0)