[TYPO3-core] RFC: uninitialized variables code cleanup
Michael Stucki
michael at typo3.org
Thu Jan 19 10:52:17 CET 2006
Hi René,
> Using PHPEclipse as IDE gives you hints were uninitialized variables are
> used. I would like to add/init those variables that the files are marked
> with real code problems only.
I'm fine with that although I expect that that will be a huge change. Is it
really worth doing this _now_ ?
> That means for example:
>
> function xyz () {
> $returnVar = '';
>
>
> function xyz () {
> $returnVar = false;
Fine.
> if (preg_match('/xyz/', $string, $matches=array())
>
> Here I init $matches inline which might be not so nice but occurs with
> preg_match and ereg calls only and is Ok in my eyes. We can do it this way
> if you prefer:
>
> $matches=array();
> if (preg_match('/xyz/', $string, $matches)
Hmm, for some reason I don't like any of them. Is this really a requirement
that $matches is declared first? I don't think so, I rather think it's a
"bug" which Eclipse doesn't ignore...
> I have no diff and ask here for allowance to do the changes and commit them
> directly to HEAD.
Remember: Do NOT touch HEAD at the moment but commit your changes to TYPO3_4-0
instead.
Regards, michael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20060119/a5dc7d94/attachment.pgp
More information about the TYPO3-team-core
mailing list