Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 2.0.0-BETA2
-
Fix Version/s: 2.0.0-BETA3
-
Component/s: None
-
Labels:None
-
Environment:Linux, PostgreSQL 8.4
Description
The database access methods in Doctrine\DBAL\Connection automatically connect to the database, if the connection has not been created yet. This is not true in case of Doctrine\DBAL\Connection::query() - if we forget to connect manually, we get:
Warning: call_user_func_array() expects parameter 1 to be a valid callback, first array member is not a valid class name or object in /.../Doctrine/DBAL/Connection.php on line 608
The problem is caused by the lack of
$this->connect();
line within the method body.
fixed