//
function strip_quotes($data)
{
- if(get_magic_quotes_gpc()) {
+ if(version_compare(phpversion(), '5.4', '<') && get_magic_quotes_gpc()) {
if(is_array($data)) {
foreach($data as $k => $v) {
$data[$k] = strip_quotes($data[$k]);
// sql completion
if (count($opts['where'])) {
$where = strpos($sql, 'WHERE')==false ? ' WHERE ':' AND ';
- $where .= '('. implode($opts['where'], ' AND ') . ')';
+ $where .= '('. implode(' AND ', $opts['where']) . ')';
$group_pos = strpos($sql, 'GROUP BY');
if ($group_pos) {
$group = substr($sql, $group_pos);
mb_internal_encoding("ASCII");
}
// set language direction
- $this->rtl = $this->l['a_meta_dir']=='rtl' ? true : false;
+
+ $this->rtl = @$this->l['a_meta_dir']=='rtl' ? true : false;
$this->tmprtl = false;
//Some checks
$this->_dochecks();
function unichr($c) {
if (!$this->isunicode) {
return chr($c);
+ } elseif ($c == '') {
+ return '';
} elseif ($c <= 0x7F) {
// one byte
return chr($c);