8000 "Undefined Variable Error" thrown for used variables whose value are null · Issue #23 · jeremeamia/super_closure · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

"Undefined Variable Error" thrown for used variables whose value are null #23

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

Closed
llaski opened this issue Sep 2, 2014 · 3 comments · Fixed by #27
Closed

"Undefined Variable Error" thrown for used variables whose value are null #23

llaski opened this issue Sep 2, 2014 · 3 comments · Fixed by #27
Labels

Comments

@llaski
Copy link
Contributor
llaski commented Sep 2, 2014

I am curious as to why isset is being used on line 153 of the closure parser where the getUsedVariables method is called, as opposed to array_key_exists. The effect is that used variables whose value are null are not passed through which becomes an issue during the unserialization process, since they can not be found. An undefined variable error is thrown instead.

if (isset($usedVarValues[$name])) {

@Ocramius
Copy link
Ocramius commented Sep 2, 2014

Just a side-note: please don't reference branches when linking code, use commit hashes instead, or the link is going to get lost in few months.

@llaski
Copy link
Contributor Author
llaski commented Sep 2, 2014

Sorry about that, link has been updated.

@jeremeamia jeremeamia added the Bug label Sep 12, 2014
@jeremeamia
Copy link
Owner

Looks like a bug. 😦 I'll make sure to address this when I have a chance to work on this project. Feel free to send a PR though, if you have time.

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

Successfully merging a pull request may close this issue.

3 participants
0