Loading


Advertisement:

Author Topic: PHP Notice in debug log about DBCommandClass.php (unable to find the reason)  (Read 29 times)

OC-Nutzer

  • Full Member
  • ***
  • Posts: 118
hi,

i have this php notice in my output log:
Code: [Select]
PHP Notice:  Array to string conversion in /home/www/oc-includes/osclass/classes/database/DBCommandClass.php on line 335
the function is a _where function:
Code: [Select]
        /**
         * Set WHERE clause
         *
         * @access private
         * @since 2.3
         * @param mixed $key
         * @param mixed $value
         * @param string $type
         * @return DBCommandClass
         */
        function _where($key, $value = null, $type = 'AND ')
        {
            if( !is_array($key) ) {
                $key = array($key => $value);
            }

            foreach($key as $k => $v) {
                $prefix = (count($this->aWhere) > 0) ? $type : '';

                if( !$this->_hasOperator($k) ) {
                    $k .= ' =';
                }

                if(!is_null($v)) {
                    $v = ' ' . $this->escape($v);
                }

                $prefix . $k . $v;
                $this->aWhere[] = $prefix . $k . $v;
            }

            return $this;
        }
line 335 is this part of mentioned function:
Code: [Select]
$v = ' ' . $this->escape($v);
after hours/days/weeks of searching for the main reason i want to ask for a solution to be able find the main reason, because all seems to work as it should..

anybody know a solution to find the main issue?

thx ;)
« Last Edit: November 14, 2017, 03:42:29 pm by OC-Nutzer »