Issue Details (XML | Word | Printable)

Key: DBAL-30
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Benjamin Eberlei
Reporter: Tomasz Jędrzejewski
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Doctrine DBAL

Doctrine\DBAL\Connection::query() method does not connect automatically to the database

Created: 29/Jun/10 11:54 AM   Updated: 30/Jun/10 02:08 PM
Component/s: None
Affects Version/s: 2.0.0-BETA2
Fix Version/s: 2.0.0-BETA3

Environment: Linux, PostgreSQL 8.4


 Description  « Hide
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.



 All   Comments   Change History   FishEye      Sort Order: Ascending order - Click to sort in descending order
Benjamin Eberlei added a comment - 30/Jun/10 02:08 PM
fixed