Re: php err msg/issue...
| From: | Curt Zirzow | Date: | Wed, 13 Oct 2004 17:07:24 +0000 |
| Subject: | Re: php err msg/issue... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-199401@lists.php.net to get a copy of this message | ||
* Thus wrote bruce:
> 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...
>...
>
> 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]
This is because the element in $rs->rows[$rs->pos] is not defined
so php made a stdClass before it can assign the ->fields member.
Curt
--
Quoth the Raven, "Nevermore."