Ticket #878 (new Bug)

Opened 6 weeks ago

Pgsql fails to throw exception on query error

Reported by: anqqa Owned by: zombor
Priority: minor Milestone: 2.2.1
Component: Libraries:Database Version: 2.2 Release
Keywords: pgsql Cc:

Description

When for example trying to INSERT new row to PostgreSQL table with duplicate unique key Kohana stops executing displaying the error page instead of throwing catchable Kohana_Database_Exception.

Fix: Line 80 in system/libraries/drivers/Database/Pgsql.php

return new Pgsql_Result(pg_query($this->link, $sql), $this->link, $this->db_config['object'], $sql);

to

return new Pgsql_Result(@pg_query($this->link, $sql), $this->link, $this->db_config['object'], $sql);
Note: See TracTickets for help on using tickets.