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

[VarDumper] Dont use empty(), it chokes on eg GMP objects #25209

Merged
merged 1 commit into from Nov 30, 2017

Conversation

@nicolas-grekas
Copy link
Member

commented Nov 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 -
@@ -94,8 +94,11 @@ protected function doClone($var)
// 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) {
case empty($v):

This comment has been minimized.

Copy link
@stof

stof Nov 29, 2017

Member

'0' is also empty according to PHP

This comment has been minimized.

Copy link
@nicolas-grekas

nicolas-grekas Nov 29, 2017

Author Member

true, but there is no need to make it a special case: handling it in the "is_string" case is enough IMHO

@nicolas-grekas nicolas-grekas force-pushed the nicolas-grekas:vardump-no-empty branch 3 times, most recently from 13d4d1b to 7937ad0 Nov 30, 2017

@nicolas-grekas nicolas-grekas force-pushed the nicolas-grekas:vardump-no-empty branch from 7937ad0 to 1b14173 Nov 30, 2017

@nicolas-grekas nicolas-grekas merged commit 1b14173 into symfony:3.3 Nov 30, 2017

3 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
fabbot.io Your code looks good.
Details
nicolas-grekas added a commit that referenced this pull request Nov 30, 2017
bug #25209 [VarDumper] Dont use empty(), it chokes on eg GMP objects …
…(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

@nicolas-grekas nicolas-grekas deleted the nicolas-grekas:vardump-no-empty branch Nov 30, 2017

This was referenced Nov 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.