X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2FZhClient.php;h=c5955aeca7a525e259a0eb652d8f48d630f5bfc3;hb=8fe0cf970401f2796ca39165a2d0a311b551c47a;hp=fd03ec4573cff4a5c0a114ae97eaaa7c9f172985;hpb=75f8f4c2f5dc72928d3e4ca44c5b95fbab1f0afb;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/ZhClient.php b/includes/ZhClient.php index fd03ec4573..c5955aeca7 100644 --- a/includes/ZhClient.php +++ b/includes/ZhClient.php @@ -81,14 +81,14 @@ class ZhClient { $result = fgets( $this->mFP, 1024 ); list( $status, $len ) = explode( ' ', $result ); - if( $status == 'ERROR' ) { + if ( $status == 'ERROR' ) { // $len is actually the error code... print "zhdaemon error $len
\n"; return false; } $bytesread = 0; $data = ''; - while( !feof( $this->mFP ) && $bytesread < $len ) { + while ( !feof( $this->mFP ) && $bytesread < $len ) { $str = fread( $this->mFP, $len - $bytesread ); $bytesread += strlen( $str ); $data .= $str; @@ -131,7 +131,7 @@ class ZhClient { $info = explode( ';', $infoline ); $ret = array(); $i = 0; - foreach( $info as $variant ) { + foreach ( $info as $variant ) { list( $code, $len ) = explode( ' ', $variant ); $ret[strtolower( $code )] = substr( $data, $i, $len ); $i += $len;