From: Mr. E23 Date: Sat, 24 Jan 2004 22:52:06 +0000 (+0000) Subject: new memcached client returns integers as strings X-Git-Tag: 1.3.0beta1~1114 X-Git-Url: https://git.heureux-cyclage.org/?a=commitdiff_plain;h=5462b899b1a04b41f8eb4815bccb9db202fe0c83;p=lhc%2Fweb%2Fwiklou.git new memcached client returns integers as strings --- diff --git a/includes/User.php b/includes/User.php index 8aa688d1cd..b0f0db7936 100644 --- a/includes/User.php +++ b/includes/User.php @@ -230,7 +230,7 @@ class User { global $wgDBname, $wgMemc; $key = "$wgDBname:newtalk:ip:{$this->mName}"; $newtalk = $wgMemc->get( $key ); - if( ! is_integer($newtalk) ) { + if( ! is_scalar( $newtalk ) ){ $sql = "SELECT 1 FROM user_newtalk WHERE user_ip='{$this->mName}'"; $res = wfQuery ($sql, DB_READ, "User::loadFromDatabase" ); diff --git a/includes/WatchedItem.php b/includes/WatchedItem.php index b66d249e17..6a0ef07af0 100644 --- a/includes/WatchedItem.php +++ b/includes/WatchedItem.php @@ -25,7 +25,7 @@ class WatchedItem { global $wgMemc; $key = $this->watchKey(); $iswatched = $wgMemc->get( $key ); - if( is_integer( $iswatched ) ) return $iswatched; + if( is_scalar( $iswatched ) ) return $iswatched; $sql = "SELECT 1 FROM watchlist WHERE wl_user=$this->id AND wl_namespace=$this->ns AND wl_title='$this->eti'"; $res = wfQuery( $sql, DB_READ );