Re: illegal offset type warnings
| From: | Chris Hall | Date: | Tue, 05 Mar 2002 21:13:49 +0000 |
| Subject: | Re: illegal offset type warnings | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-933@lists.php.net to get a copy of this message | ||
argh, nm. i have no brain.
don't even point it out.
----- Original Message -----
From: "Chris Hall" <chall5@tampabay.rr.com>
To: <pear-general@lists.php.net>
Sent: Tuesday, March 05, 2002 4:06 PM
Subject: [PEAR] illegal offset type warnings
> question: i'm doing some testing of some code on an empty table (i'm not
> expecting any results)...
>
> i create the connection object and set DB_FETCHMODE_ASSOC outside the
> function.
> i am using php4.1.2, postgresql 7.1
>
> ---code---
>
> function getCaseList() {
>
> global $dbh;
>
> $query = "select case_id from ".DB_CASE_DATA_TABLE." order by case_id";
>
> $result = $dbh->query($query);
>
> if(DB::isError($result)) {
> $error = new PEAR_Error($result->getMessage());
> return $error;
> }
>
> $case = array();
>
> error_log("marker1");
> while($row = $dbh->fetchRow($result)) {
>
> $case["case_id"] = $row["case_id"];
>
> $this->cases[] = $case;
> }
> error_log("marker2");
>
> return true;
> }
>
> ---code---
>
> i receive the following warning msgs in the log:
>
> [Tue Mar 5 15:24:40 2002] [error] marker1
> [Tue Mar 5 15:24:40 2002] [error] PHP Warning: Illegal offset type in
> /usr/local
> /lib/php/DB/pgsql.php on line 295
> [Tue Mar 5 15:24:40 2002] [error] PHP Warning: Illegal offset type in
> /usr/local
> /lib/php/DB/pgsql.php on line 296
> [Tue Mar 5 15:24:40 2002] [error] marker2
>
> could this be because the table is empty?
>
>
>
> --
> PEAR General Mailing List (http://pear.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>