Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[VarDumper] Dont use empty(), it chokes on eg GMP objects#25209
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
nicolas-grekas commentedNov 29, 2017
| Q | A |
|---|---|
| Branch? | 3.3 |
| Bug fix? | yes |
| New feature? | no |
| BC breaks? | no |
| Deprecations? | no |
| Tests pass? | yes |
| Fixed tickets | #25198 |
| License | MIT |
| Doc PR | - |
| // Create $stub when the original value $v can not be used directly | ||
| // If $v is a nested structure, put that structure in array $a | ||
| switch (true) { | ||
| caseempty($v): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
'0' is also empty according to PHP
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
true, but there is no need to make it a special case: handling it in the "is_string" case is enough IMHO
13d4d1b to7937ad0Compare7937ad0 to1b14173Compare…(nicolas-grekas)This PR was merged into the 3.3 branch.Discussion----------[VarDumper] Dont use empty(), it chokes on eg GMP objects| Q | A| ------------- | ---| Branch? | 3.3| Bug fix? | yes| New feature? | no| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets |#25198| License | MIT| Doc PR | -Commits-------1b14173 [VarDumper] Dont use empty(), it chokes on eg GMP objects