joomla/joomla-cms — pull request #2831 by jms2win (2014-01-23 16:56:10+00:00)
Title: Error are not reported due to $this->connected() call

Due to the fact that the

$this->errorNum = (int) mysql_errno($this->connection);
$this->errorMsg = (string) mysql_error($this->connection) . ' SQL=' . $query;

was after the call to if (!$this->connected())
then the error message was empty because it contains the result of the $this->connected() call.

See bugtracker 33185
http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_id=8103&tracker_item_id=33185