-
Notifications
You must be signed in to change notification settings - Fork 295
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
Error when trying to use $db->vardump() #163
Comments
You need to turn on debug outputting currently it's off by default. The error must be referring to ezsql/tests/pdo/pdo_mysqlTest.php Line 265 in 34e49ce
Will need more info to track down. |
Ah, thanks, that would be why. I didn't see that function in any of the documentation or the phpunit test files. I've updated the documentation in the Wiki to reflect your notes for future people 😄 Ok so now the debug is working, I'm still getting that error. What more information do you require from me and I'll send it through. This is exactly what I get:
I did some echoing the line above and returns an array. the line in question is as follows:
The code that's throwing back the error is the I changed the line to |
You getting the error because you are proceeding thinking you got valid results already. Check
No fix, it should return the results of the last successful query. which you are not getting. |
Not correct, it fails no matter what my query is. I tried this code which still gives me the same error $userData = 'dpdesignz';
$result = $db->get_row("SELECT * FROM users WHERE user_login='$userData'");
$db->varDump($result); But if I run the debug it returns
So I know the SQL is returning a result. The issue is that the value of You can't echo out an object (or array) which is what the line of code that is giving the error is doing
But adding in the |
You should submit PR. |
This is my first time doing a PR so hopefully that's right 😃 |
Describe the bug
I tried to use the
$db->vardump()
method because the$db->debug()
method wasn't spitting anything out, and I got the following error:Object of class stdClass could not be converted to string
in\vendor\ezsql\ezsql\lib\ezsqlModel.php:462
To Reproduce
Using PDO connection
Then tried to run
selecting
Expected behavior
I expected the debug screen to come up (which nothing comes up, even if I don't try to run the vardump method) and the vardump to output some data (this is where an error pops up).
If I remove both of the methods I can see the object results using a standard
var_dump($result);
so I know the query is executing, I just can't get thedebug
to actually show me anything and I can't get thevardump
to output as I get the error mentioned above.Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: