[Solar-talk] Solar_Sql_Model::fetchNew() possible bug

Paul M Jones pmjones at ciaweb.net
Wed Mar 28 21:19:48 PDT 2007


On Mar 22, 2007, at 8:45 AM, Rodrigo Moraes wrote:

> I think there is a bug in Solar_Sql_Model::fetchNew(), lines  
> 1202-1204:
>
>         // set placeholders for relateds.
>         foreach ($this->_related as $key) {
>             $data[$key] = null;
>         }
>
> $this->_related is an array with key => array(), so it generates an
> 'illegal offset type' error. I think it should be:
>
>         // set placeholders for relateds.
>         foreach ($this->_related as $key => $val) {
>             $data[$key] = null;
>         }
>
> I'm just checking and will open a ticket later.

It was indeed a bug; saw your ticket, and committed a fix.  Thanks  
Rodrigo.  :-)



--

Paul M. Jones  <http://paul-m-jones.com>

Solar: Simple Object Library and Application Repository
for PHP5.   <http://solarphp.com>

Savant: The simple, elegant, and powerful solution for
templates in PHP.   <http://phpsavant.com>




More information about the solar-talk mailing list