Welcome Guest, Not a member yet? Register   Sign In
Postgres 9.2 Upgrade Broke Foreach on ->result()
#2

[eluser]Doulos[/eluser]
Not sure this won't have other consequences, so people more familiar with the code base can do the modification and pull request,

But the fix I used is to update the public function select in DB_active_rec.php

Code:
public function select($select = '*', $escape = NULL)
{
  if (is_string($select))
  {
   $select = explode(',', $select);
  }
        //Added the Is_array Check 11/6/2012
        if (is_array($select)){
            foreach ($select as $val)
            {
                $val = trim($val);

                if ($val != '')
                {
                    $this->ar_select[] = $val;
                    $this->ar_no_escape[] = $escape;

                    if ($this->ar_caching === TRUE)
                    {
                        $this->ar_cache_select[] = $val;
                        $this->ar_cache_exists[] = 'select';
                        $this->ar_cache_no_escape[] = $escape;
                    }
                }
            }
        }
  return $this;
}


Messages In This Thread
Postgres 9.2 Upgrade Broke Foreach on ->result() - by El Forum - 11-06-2012, 12:54 PM
Postgres 9.2 Upgrade Broke Foreach on ->result() - by El Forum - 11-06-2012, 01:01 PM
Postgres 9.2 Upgrade Broke Foreach on ->result() - by El Forum - 11-06-2012, 01:44 PM



Theme © iAndrew 2016 - Forum software by © MyBB