8000 var-dumper error on PDO dump · Issue #13042 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

var-dumper error on PDO dump #13042

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
sbarex opened this issue Dec 19, 2014 · 1 comment
Closed

var-dumper error on PDO dump #13042

sbarex opened this issue Dec 19, 2014 · 1 comment

Comments

@sbarex
Copy link
sbarex commented Dec 19, 2014

I have a PDO object created with this code:

$pdo = new \PDO($dsn, $username, $password, $driver_options);
$pdo->setAttribute(\PDO::ATTR_STATEMENT_CLASS, array('MyPDOStatementDebug', array($pdo)));
// ...
dump($pdo); // <- warning here!

When I dump the PDO Object the program show this warning:
Warning: Illegal offset type in isset or empty in /public-html/vendor/symfony/var-dumper/Symfony/Component/VarDumper/Caster/PdoCaster.php on line 74.

My STATEMENT_CLASS attribute set to an array cause the error.

@fabpot
Copy link
Member
fabpot commented Dec 20, 2014

ping @nicolas-grekas

fabpot added a commit that referenced this issue Dec 23, 2014
This PR was merged into the 2.6 branch.

Discussion
----------

[VarDumper] fix and test PdoCaster

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #13042
| License       | MIT
| Doc PR        | -

Commits
-------

0b1be13 [VarDumper] fix and test PdoCaster
@fabpot fabpot closed this as completed Dec 23, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
0