[TYPO3-core] RFC: uninitialized variables code cleanup

René Fritz rene at typo3.org
Thu Jan 19 11:18:23 CET 2006


> I'm fine with that although I expect that that will be a huge change. Is it
> really worth doing this _now_ ?

This will take not too long. I will do that for the obvious things only. More 
tricky things can be done later.

> > function xyz () {
> >    $returnVar = '';
> >
> >
> > function xyz () {
> >    $returnVar = false;
>
> Fine.

So I have the allowance for that I think.


> > 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...

It depends on the view. How does the Zend IDE handle such things?
Anyway if the IDE can help me make more clean code I am willing to do some 
changes.

Dmitry fixed two bugs in tslib while doing so.

> > 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.

Thanks for (needed) the hint.

René

-- 
René Fritz
TYPO3 Association - Active Member
http://association.typo3.org/



More information about the TYPO3-team-core mailing list