diff --git a/inc/functions.php b/inc/functions.php
index 3924c01..aefbd9e 100644
--- a/inc/functions.php
+++ b/inc/functions.php
@@ -278,7 +278,7 @@ function checkBanned() {
if ($ban['expire'] == 0 || $ban['expire'] > time()) {
$expire = ($ban['expire'] > 0) ? ('
This ban will expire ' . strftime(TINYIB_DATEFMT, $ban['expire'])) : '
This ban is permanent and will not expire.';
$reason = ($ban['reason'] == '') ? '' : ('
Reason: ' . $ban['reason']);
- fancyDie('Your IP address ' . $ban['ip'] . ' has been banned from posting on this image board. ' . $expire . $reason);
+ fancyDie('Your IP address ' . $_SERVER['REMOTE_ADDR'] . ' has been banned from posting on this image board. ' . $expire . $reason);
} else {
clearExpiredBans();
}