From e315a61b5951eb5f131ab5c1bd75d9959a512d8a Mon Sep 17 00:00:00 2001 From: Joost van Dijk Date: Fri, 24 Jul 2015 00:33:39 +0200 Subject: [PATCH] fix tiqr client version log message --- www/tiqr/tiqr.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/www/tiqr/tiqr.php b/www/tiqr/tiqr.php index 0b287428..bc7a8320 100644 --- a/www/tiqr/tiqr.php +++ b/www/tiqr/tiqr.php @@ -101,7 +101,8 @@ function register( $enrollmentSecret, $secret, $notificationType, $notificationA logger()->addInfo("sent metadata"); break; case "POST": - logger()->addDebug(sprintf("Received POST request from tiqr client version %s", $_SERVER['HTTP_X_TIQR_PROTOCOL_VERSION'])); + $version = array_key_exists('HTTP_X_TIQR_PROTOCOL_VERSION', $_SERVER) ? $_SERVER['HTTP_X_TIQR_PROTOCOL_VERSION'] : "1"; + logger()->addDebug(sprintf("Received POST request from tiqr client version %s", $version)); $operation = preg_replace("/[^a-z]+/", "", $_POST['operation']); logger()->addInfo(sprintf("received operation '%s'", $operation)); $notificationType = preg_replace("/[^a-zA-Z0-9]+/", "", $_POST['notificationType']);