From 4c6b074e85d7d8e97b9f125f5fbc2949bc8839dd Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Mon, 18 Feb 2019 20:12:17 +0100 Subject: buildmaster/build-list-links.php,buildmaster/build-list.php,buildmaster/build-slaves.php,buildmaster/deletion-links.php,buildmaster/dependencies.php,buildmaster/log.php,buildmaster/mysql-issues.php,buildmaster/statistics.php,buildmaster/todos.php,lib/format.php,mirrors/index.php,packages/index.php: isset($_GET[$x]) -> array_key_exists($x, $_GET) --- lib/format.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/format.php') diff --git a/lib/format.php b/lib/format.php index 72cf531..25748f0 100644 --- a/lib/format.php +++ b/lib/format.php @@ -12,15 +12,15 @@ function export_as_requested($content) { $content["tsv"]=$content["All"]; unset($content["All"]); } - if (isset($content["json"]) && isset($_GET["json"])) { + if (isset($content["json"]) && array_key_exists("json", $_GET)) { header ("Content-type: application/json"); print json_encode( $content["json"], JSON_UNESCAPED_SLASHES ); - } elseif (isset($content["tsv"]) && isset($_GET["tsv"])) { + } elseif (isset($content["tsv"]) && array_key_exists("tsv", $_GET)) { header ("Content-type: text/tab-separated-values"); - if (! isset($_GET["no-headers"])) + if (! array_key_exists("no-headers", $_GET)) print implode("\t",array_keys($content["tsv"][0])) . "\n"; print implode( "", -- cgit v1.2.3