I broke PEAR::DB!
| From: | Aidan Lister | Date: | Thu, 24 Jun 2004 08:37:51 +0000 |
| Subject: | I broke PEAR::DB! | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-31166@lists.php.net to get a copy of this message | ||
Hey devs,
This bug was recently fixed in the CVS version of PHP5. This causes a big
problem in DB.
http://bugs.php.net/28879
You can see the affects here:
Warning: Resource ID#52 used as offset, casting to integer (52) in
/usr/local/php5.0.0RC1/lib/php/DB/pgsql.php on line 285
Warning: Resource ID#52 used as offset, casting to integer (52) in
/usr/local/php5.0.0RC1/lib/php/DB/pgsql.php on line 286
Warning: Resource ID#52 used as offset, casting to integer (52) in
/usr/local/php5.0.0RC1/lib/php/DB/pgsql.php on line 310
Warning: Resource ID#52 used as offset, casting to integer (52) in
/usr/local/php5.0.0RC1/lib/php/DB/pgsql.php on line 285
That's from guru's server.
The fix is simple, if you use a resource as an array key you must explicity
cast it first.
$arr[(int)$resource];
Yeh - so, um sorry about that :)