Additional 7.4 compatibility fixes.
authorJanusz Dobrowolski <janusz@frontaccounting.eu>
Mon, 6 Jul 2020 09:18:11 +0000 (11:18 +0200)
committerJanusz Dobrowolski <janusz@frontaccounting.eu>
Mon, 6 Jul 2020 09:18:11 +0000 (11:18 +0200)
includes/session.inc
includes/ui/ui_lists.inc
reporting/includes/tcpdf.php

index 06aceccea2cf5620fe3f65cb8a8ec51092b9a935..21c402e0033284c54b7ce832efe32acc8256a451 100644 (file)
@@ -312,7 +312,7 @@ function set_page_security($value=null, $trans = array(), $gtrans = array())
 //
 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]);
index 55ef6777d5d004a40c4fbcfa8c82cadde687713c..417d6032f4185190797cd0e08423b1b2d42692cc 100644 (file)
@@ -158,7 +158,7 @@ $opts = array(              // default options
        // 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);
index 71fb75effc11f697cbfef7883ca58747fff74373..01d15527f598cb1bd827d563cc2af5180ebdee6f 100644 (file)
@@ -1124,7 +1124,8 @@ if (!class_exists('TCPDF')) {
                                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();
@@ -3520,6 +3521,8 @@ if (!class_exists('TCPDF')) {
                function unichr($c) {
                        if (!$this->isunicode) {
                                return chr($c);
+                       } elseif ($c == '') {
+                               return '';
                        } elseif ($c <= 0x7F) {
                                // one byte
                                return chr($c);