[TYPO3-core] RFC: GIFBUILDER transparency

Martin Kutschker Martin.Kutschker at blackbox.net
Sat Mar 18 10:20:06 CET 2006


Franz Holzinger <franz at fholzinger.com> writes on 
Fri, 17 Mar 2006 19:05:17 +0100 (MET):

> 
> +1, if the question about using -1 or false has been clarified by
> someone else.
> And please copy your good comments as comments to the code lines.


I have no proof, but I think that in TYPO3 usually the same type for a return value is preferred. There was much mumbling when I tried to change the return value for a plugin's main method. So using -1 is probably more in line with existing TYPO3 code and resembles the PHP API for this specific task.

So maybe sticking to the type is a good general rule.

But I think that there may be exemptions to a rule. eg if we have an extenstion to an existing PHP API we should mimick it's behaviour. And if it may return FALSE on failure or some other condition then we should do the same.

And there may be cases where also negative ints are possible results, so here FALSE is the only way to signal an error.

Masi 



More information about the TYPO3-team-core mailing list