diff options
author | Aleksander Machniak <alec@alec.pl> | 2012-08-08 09:49:43 +0200 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2012-08-08 09:49:43 +0200 |
commit | 15442512d249380851aaa7878a541559ee4f6782 (patch) | |
tree | d1ca66d86670ddeb1862ff62eb6b7680ea5496ea /program/include/rcube_db.php | |
parent | ea08d4c9617b2ffd36a53d3759e102a3c52ef69b (diff) |
(Again) return error message from is_error()
Diffstat (limited to 'program/include/rcube_db.php')
-rw-r--r-- | program/include/rcube_db.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/program/include/rcube_db.php b/program/include/rcube_db.php index 01abfc8b4..042ca15e4 100644 --- a/program/include/rcube_db.php +++ b/program/include/rcube_db.php @@ -268,15 +268,15 @@ class rcube_db * * @param int $res_id Optional query result identifier * - * @return boolean True on error, False otherwise + * @return string Error message */ public function is_error($res_id = null) { if ($res_id !== null) { - return $this->_get_result($res_id) === false; + return $this->_get_result($res_id) === false ? $this->db_error_msg : null; } - return $this->db_error; + return $this->db_error ? $this->db_error_msg : null; } /** |