[TYPO3-dev] Untouched bug in Bugtracker

Stefan Frömken firma at sfroemken.de
Thu Aug 12 09:45:13 CEST 2010


Georg Ringer schrieb:
> If there is nothing available, there should be nothing returned. It would
> be the same as
> lib.fo = FILE
> lib.fo.file = something/that/doesnt/exist.jpg
> this will also return nothing if the path/file does not exist and not
> any other "magic" image (*on default*).
> 
> Georg

OK...and why do you set a value when $key is lower than 0?!

function getKey($key,$arr)	{
	$key = intval($key);
	if (is_array($arr))	{
		if ($key < 0)	{
			$key = count($arr)+$key;
		}
		if ($key < 0)	{
			$key=0;
		}
	}
	return $key;
}




More information about the TYPO3-dev mailing list