Show captche expect/actual in debug mode

Change-Id: I854f7d41193b183f70fa75b55f46bc92cf680f7a
diff --git a/index.php b/index.php
index 47712cd..9f75d0c 100755
--- a/index.php
+++ b/index.php
@@ -127,7 +127,7 @@
 
 function verify_request(User $user)
 {
-    global $log, $CONFERENCE_REGISTRATION, $CAPTCHA_LENGTH;
+    global $log, $CONFERENCE_REGISTRATION, $CAPTCHA_LENGTH, $DEBUG;
 
     $TEMPLATE = template_path();
     unset($_SESSION['captcha_token']);
@@ -147,7 +147,7 @@
 
 
     if ($CAPTCHA_LENGTH > 0  &&  !(isset($_SESSION['captcha']) && PhraseBuilder::comparePhrases($_SESSION['captcha'], $_POST['captcha']))) {
-        $error = $error . $STRINGS->wrong_captcha;
+        $error = $error . $STRINGS->wrong_captcha . ($DEBUG ? " expected: " . $_SESSION['captcha'] . " actual: " . $_POST['captcha'] : "");
     }
     unset($_SESSION["captcha"]);