diff options
author | Christian Weber | 2011-12-30 17:49:19 +0000 |
---|---|---|
committer | Christian Weber | 2011-12-30 17:49:19 +0000 |
commit | 9ac919dad1b02042493d765f85511ab0221671c3 (patch) | |
tree | 1deaa70cc420ea5b7caaca25b934240bcfc86e5a | |
parent | 60a6ccd281bfcb5834be32d9cab18f91c00fab02 (diff) | |
download | itools-9ac919dad1b02042493d765f85511ab0221671c3.tar.gz itools-9ac919dad1b02042493d765f85511ab0221671c3.tar.bz2 itools-9ac919dad1b02042493d765f85511ab0221671c3.zip |
check return code of mysql_set_charset()
-rw-r--r-- | it_dbi.class | 3 |
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; |