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
Call to a member function prepare() on a non-object in vendor\redbean\rb.php on line 92 #138
Comments
Nevermind, found the issue - stray R::close() call. Can we get an exception to be thrown within RedBean if |
I really need to add some convient exceptions that is true. |
done |
Having the exact same issue but I am intending to load and process the databases from a list, one by one in a for loop. :-) Is there any way to go around this error to be able to close then setup the next file? |
If an exception was added for "no PDO object being present internally" (or something like that) a try/catch would work. e: wait...why not use named database connections for your circumstance? |
@gabordemooij I just noticed an underlying problem here that this is a symptom of - shouldn't |
…e connection is closed Reference issue #138
For some reason, $this->pdo is getting nuked in RedBean at some point.
In fact, queries prior to this one run just fine - this one, however, is being run on an object's __destruct call if that makes any difference.
edit: As you can also see here, the prior queries (I enabled R::debug for this) run just fine.
http://puu.sh/kQ8Y
and the var_dump there is of what is being stored (using the following method in my own code)
Not sure what to think of this. Is RedBean not safe to rely on within the
register_shutdown_function()
context?The text was updated successfully, but these errors were encountered: