summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--it_dbi.class3
1 files changed, 2 insertions, 1 deletions
diff --git a/it_dbi.class b/it_dbi.class
index 09ff18d..04206ca 100644
--- a/it_dbi.class
+++ b/it_dbi.class
@@ -226,7 +226,8 @@ function _connect($p = array())
# set charset used for this connection
if ($p['charset'])
- mysql_set_charset($p['charset'], $this->_link);
+ if (!mysql_set_charset($p['charset'], $this->_link))
+ $this->_fatal("_connect(): can't set charset \"{$p['charset']}\"");
# NOTE: This overwrites old state but that is on purpose. New link means we should refetch all info about connection
$state['link'] = $this->_link;