RE: php err msg/issue...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



$rec is not empty....

jason...

1st, if $rec was empty.. the 'if' section would not be called, and the err
would not be thrown....

2nd.. i printed the value of '$rec' below the 'if' block of code...

but.. umm thanks...



-----Original Message-----
From: Jason Davidson [mailto:jdavidson@xxxxxxxxx]
Sent: Wednesday, October 13, 2004 9:51 AM
To: bedouglas@xxxxxxxxxxxxx; php-general@xxxxxxxxxxxxx
Subject: Re:  php err msg/issue...


I gather $rec is empty.. :)  make sure there is something in it before
you assign it to that object member.

Jason
<bedouglas@xxxxxxxxxxxxx> wrote:
>
> hi...
>
> i'm dealing with an app that's throwing an err/warning msg.. i'm using
php5,
> on a linux rh8.0 system.
>
> i believe the code was written for php4.
>
> the code is:
>
> if($rec)
>  {
> $rs->append($setDefaults);
> $rs->rows[$rs->pos]->fields=$rec;  <<<<<<generates err msg...
> $rs->rows[$rs->pos]->id=-1;
> }
>
> $rec = Array ( [0] => 0 [1] => admin [2] =>
21232f297a57a5a743894a0e4a801fc3
> [3] => [4] => TRUE )
>
>
> the err msg being generated is:
> Php-Txt-Db-Access Error:
> PHP Error: [2048] Creating default object from empty value [Line: 1537]
> [File: /var/www/html/blast/txtdbapi/resultset.php]
>
>
> i'm not sure why this is generated, or what's going on, or even how/why to
> correct it!! apparently this doesn't happen with php4, but i'm not
certain.
>
> any thoughts/opinions/comments would be helpful...
>
> thanks
>
> -bruce
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux