diff --git a/src/Common/Message/AbstractResponse.php b/src/Common/Message/AbstractResponse.php
index e958f4b2..82813e6f 100644
--- a/src/Common/Message/AbstractResponse.php
+++ b/src/Common/Message/AbstractResponse.php
@@ -212,11 +212,13 @@ public function getRedirectResponse()
$hiddenFields = '';
foreach ($this->getRedirectData() as $key => $value) {
- $hiddenFields .= sprintf(
- '',
- htmlentities($key, ENT_QUOTES, 'UTF-8', false),
- htmlentities($value, ENT_QUOTES, 'UTF-8', false)
- )."\n";
+ if (!is_null($value)) {
+ $hiddenFields .= sprintf(
+ '',
+ htmlentities($key, ENT_QUOTES, 'UTF-8', false),
+ htmlentities($value, ENT_QUOTES, 'UTF-8', false)
+ )."\n";
+ }
}
$output = '