Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.12.3

Bug #6683 createTables.php - sybase - FatalError
Submitted: 2006-02-03 12:28 UTC
From: uros dot cesnik at liv dot si Assigned: aharvey
Status: Closed Package: DB (version 1.7.6)
PHP Version: 5.1.0 OS: linux
Roadmaps: (Not assigned)    
Subscription  


 [2006-02-03 12:28 UTC] uros dot cesnik at liv dot si
Description: ------------ When i run createTables.php for my sybase database, throws an error. ERROR: Fatal error: Cannot use object of type DB_Error as array in /usr/local/lib/php/DB/sybase.php on line 817. I use Adaptive Server Anywhere 8.0.2. I look in sybase.php, line 817 and found procedure "sp_helpindex". There is no sp_helpindex procedure in ASA.

Comments

 [2006-12-21 04:40 UTC] aharvey (Adam Harvey)
The fix for this looks like being: diff -u -u -r1.79 sybase.php --- DB/sybase.php 14 Jun 2005 12:42:28 -0000 1.79 +++ DB/sybase.php 21 Dec 2006 04:39:32 -0000 @@ -814,7 +814,7 @@ // get unique/primary keys $res = $this->getAll("sp_helpindex $table", DB_FETCHMODE_ASSOC); - if (!isset($res[0]['index_description'])) { + if (DB::isError($res) || !isset($res[0]['index_description'])) { return ''; } Will apply once karma is granted.
 [2007-01-11 09:11 UTC] aharvey (Adam Harvey)
An update: I'm not so convinced about the patch in the last comment now, and I can't run Sybase tests at present due to PHP bug 39058. Until I can, I probably can't close this out.
 [2007-02-06 07:35 UTC] aharvey (Adam Harvey)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.