Re: cvs: pear /Spreadsheet_Excel_Writer/Writer BIFFwriter.php

From: Date: Wed, 01 Oct 2003 10:01:25 +0000
Subject: Re: cvs: pear /Spreadsheet_Excel_Writer/Writer BIFFwriter.php
References: 1  Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-13206@lists.php.net to get a copy of this message
> + // Check if "pack" gives the required IEEE 64bit float > + $teststr = pack("d", 1.2345); > + $number = pack("C8", 0x8D, 0x97, 0x6E, 0x12, 0x83, 0xC0, 0xF3, 0x3F); > + if ($number == $teststr) { > + $byte_order = 0; // Little Endian > + } > + elseif ($number == strrev($teststr)){ > + $byte_order = 1; // Big Endian > + } > + else { > + // Give up. I'll fix this in a later version. > + return $this->raiseError("Required floating point format ". > + "not supported on this platform."); > } PEAR CS! http://pear.php.net/manual/en/standards.control.php on the other thing you didn't reply neither fixed it: From: Mirco 'meebey' Bauer <pear-cvs@meebey.net> To: pear-cvs@lists.php.net Subject: Re: [PEAR-CVS] cvs: pear /Log_Parser Parser.php Date: Wed, 24 Sep 2003 21:07:45 +0200 On Wed, 2003-09-24 at 17:34, Xavier Noguer Gallego wrote: > - for ($i = 1; $i <= count($lineDef); $i++) { > - $this->_indexes[$lineName][$i] = $config_array[$lineName][$i]['name']; > - $this->regex[$lineName] .= $config_array[$lineName][$i]['pattern']; > + for ($i = 1; $i <= (count($lineDef)); $i++) { > + @$this->_indexes[$lineName][$i] = @$config_array[$lineName][$i]['name']; > + @$this->regex[$lineName] .= @$config_array[$lineName][$i]['pattern']; putting on everything a "@" fixes your problems? if you wan't to be sure that the array index exist, _use_ isset() not @ and putting a function call into the for condition is not good, the function (count()) is called on every cycle, if the value doesn't change, like in this case ($lineDef) it should call count() once and store it into a variable and then use the variable instead the functioncall.... This is just QA Mirco

« previous php.pear.cvs (#13206) next »