Fix NS_PROJECT_TALK (bug #7792)
[lhc/web/wiklou.git] / includes / ZhClient.php
index 0451ce8..9c9461d 100644 (file)
@@ -38,6 +38,7 @@ class ZhClient {
         */
        function connect() {
                wfSuppressWarnings();
+               $errno = $errstr = '';
                $this->mFP = fsockopen($this->mHost, $this->mPort, $errno, $errstr, 30);
                wfRestoreWarnings();
                if(!$this->mFP) {
@@ -115,7 +116,6 @@ class ZhClient {
                foreach($info as $variant) {
                        list($code, $len) = explode(' ', $variant);
                        $ret[strtolower($code)] = substr($data, $i, $len);
-                       $r = $ret[strtolower($code)];
                        $i+=$len;
                }
                return $ret;