Welcome Guest, Not a member yet? Register   Sign In
Postgres Error after update to 1.7.2
#2

[eluser]Milaan[/eluser]
Hmmm looks like $this->_like_escape_char is undefined in this function...
Code:
// --------------------------------------------------------------------

    /**
     * Like
     *
     * Called by like() or orlike()
     *
     * @access    private
     * @param    mixed
     * @param    mixed
     * @param    string
     * @return    object
     */
    function _like($field, $match = '', $type = 'AND ', $side = 'both', $not = '')
    {
        if ( ! is_array($field))
        {
            $field = array($field => $match);
        }
    
        foreach ($field as $k => $v)
        {
            $k = $this->_protect_identifiers($k);

            $prefix = (count($this->ar_like) == 0) ? '' : $type;

            $v = $this->escape_like_str($v);

            if ($side == 'before')
            {
                $like_statement = $prefix." $k $not LIKE '%{$v}'";
            }
            elseif ($side == 'after')
            {
                $like_statement = $prefix." $k $not LIKE '{$v}%'";
            }
            else
            {
                $like_statement = $prefix." $k $not LIKE '%{$v}%'";
            }
            
            // some platforms require an escape sequence definition for LIKE wildcards
            if ($this->_like_escape_str != '')
            {
                $like_statement = $like_statement.sprintf($this->_like_escape_str, $this->_like_escape_char);
            }
            
            $this->ar_like[] = $like_statement;
            if ($this->ar_caching === TRUE)
            {
                $this->ar_cache_like[] = $like_statement;
                $this->ar_cache_exists[] = 'like';
            }
            
        }
        return $this;
    }


Messages In This Thread
Postgres Error after update to 1.7.2 - by El Forum - 09-14-2009, 01:44 AM
Postgres Error after update to 1.7.2 - by El Forum - 09-14-2009, 04:20 AM
Postgres Error after update to 1.7.2 - by El Forum - 09-17-2009, 12:49 AM
Postgres Error after update to 1.7.2 - by El Forum - 09-17-2009, 06:52 AM
Postgres Error after update to 1.7.2 - by El Forum - 09-18-2009, 05:35 AM
Postgres Error after update to 1.7.2 - by El Forum - 09-18-2009, 08:02 AM
Postgres Error after update to 1.7.2 - by El Forum - 09-18-2009, 08:10 AM
Postgres Error after update to 1.7.2 - by El Forum - 09-23-2009, 08:44 AM
Postgres Error after update to 1.7.2 - by El Forum - 10-28-2009, 01:06 PM



Theme © iAndrew 2016 - Forum software by © MyBB