Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undefined variable: classNames #7

Closed
andreasciamanna opened this issue Apr 10, 2015 · 1 comment
Closed

Undefined variable: classNames #7

andreasciamanna opened this issue Apr 10, 2015 · 1 comment
Labels

Comments

@andreasciamanna
Copy link

While parting the structure.xml of two projects which are in a EOL stage (they are now embedded in another project), I got the following notice, which lead to a warning and then to a catchable fatal error.

Basically in Parser::getClassDefinitions the variable $classNames gets initialized only inside the loop, but used outside.

By simply adding $classNames = array(); before the loop, all the issues are gone.

I hope this is the only case, as it's not a good habit to use a variable that might be not initialized.

@evert
Copy link
Owner

evert commented Apr 10, 2015

Definitely not my habit to do that! Frankly this tool was written in a few hours for my own purposes. Not surprising people run into little issues here and there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants