[Solar-talk] toArray() current()

Paul M Jones pmjones at ciaweb.net
Mon Feb 12 10:32:20 PST 2007


On Feb 12, 2007, at 3:42 AM, Antti Holvikari wrote:

> On 2/12/07, Jeff Surgeson <solar at 3hex.com> wrote:
>> Hi
>>
>> Trying to get my sql auth / access role / stuff to run under the  
>> new model
>> branch, not using the model class just the sql_table etc, however  
>> they now
>> generate the following errors, I have checked the sql_rowset class  
>> all seems
>> the same so why does it now generate this error under branch but  
>> runs under
>> svn?
>>
>> The access_adapter_sql is based on Antti's class (thanks Antti)  
>> the rest, auth
>> etc is all solar std stuff.
>>
>> Fatal error: Call to a member function toArray() on a non-object
>> in /var/www/localhost/htdocs/Test/Bulldog/Access/Adapter/Sql.php  
>> on line 142
>
> I believe it's this line:
>
>         // fetch and cast to array
>         $list = $select->fetch('all')->toArray();
>
> I think Paul might know what has changed so that you won't get an
> Solar_Sql_Rowset object from that call to fetch().

In the "model" branch, yes, this is correct.  The model branch is  
very much in chaos right now, as I knock things around.



--

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

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

Join the Solar community wiki!  <http://solarphp.org>

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




More information about the solar-talk mailing list