[Typo3-dev] Bug in class.gzip_encode

4Dfx peter.russ at 4dfx.de
Thu Sep 4 12:22:16 CEST 2003


Michiel van Leening schrieb:

> Simon,
> 
> Please refer to
> http://www.php.net/manual/en/language.operators.comparison.php
> 
> On Wed, 2003-09-03 at 22:44, Simon Child wrote:
> 
>>class.gzip_encode  contains the following section:
>>
>>from line 168:
>>        if ($level === true) {
>>            $level = $this->get_complevel();
>>        }
>>        $this->level = $level;
>>
>>        $contents = ob_get_contents();
>>        if ($contents === false) return;
>>
>>(The code on leknor.com is the same.)
>>
>>But is that triple equals sign valid syntax??
>>[...]

Ref to the manual the codes reads as follow
"if the level is equal to 0 and is of type Boolean then set the variable 
level"
I have no idea if it makes sence to compare level or contant with 
Boolean type. This will only work if a methode would return this type i.e.
	function xyz()
	{
		if(..) return true;
		else if (...) return false;
		else return $something;
	}
This comparision will not work for following methode
	function xyz()
	{
		if(..) return 0;
		else if (...) return -1;
		else return $something;
	}


Gruss. Peter.

www.ebconclub.net






More information about the TYPO3-dev mailing list