From 4b6d775b379d936274e19ee894461de74ed9d929 Mon Sep 17 00:00:00 2001 From: Greg Sabino Mullane Date: Wed, 16 Aug 2006 00:59:34 +0000 Subject: [PATCH] Use NULL not empty string for rc_ip if our DB is picky. --- includes/RecentChange.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/includes/RecentChange.php b/includes/RecentChange.php index 4361ca3cce..3f91074f36 100644 --- a/includes/RecentChange.php +++ b/includes/RecentChange.php @@ -108,6 +108,11 @@ class RecentChange $this->mAttribs['rc_ip'] = ''; } + ## If our database is strict about IP addresses, use NULL instead of an empty string + if ( $dbw->strictIPs() and $this->mAttribs['rc_ip'] == '' ) { + unset( $this->mAttribs['rc_ip'] ); + } + # Fixup database timestamps $this->mAttribs['rc_timestamp'] = $dbw->timestamp($this->mAttribs['rc_timestamp']); $this->mAttribs['rc_cur_time'] = $dbw->timestamp($this->mAttribs['rc_cur_time']); -- 2.20.1