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

Bug #6053 create sequence error and a warning
Submitted: 2005-11-24 04:23 UTC Modified: 2005-11-24 09:18 UTC
From: alex at cgi-central dot net Assigned: lsmith
Status: Closed Package: MDB2_Schema
PHP Version: 4.3.11 OS: any
Roadmaps: (Not assigned)    
Subscription  


 [2005-11-24 04:23 UTC] alex at cgi-central dot net
Description: ------------ 1. There was a warning if array element is not exists in $changes array. It is eliminated by first change in diff. 2. alterDatabaseSequences() function passed $sequence variable to createSequence function. But in $changes array this set to "1", of course it does not look like a valid sequence definition. Fixed. Test script: --------------- +++ MDB2/Schema.php 24 Nov 2005 09:18:54 -0000 @@ -1234,6 +1234,7 @@ function verifyAlterDatabase($changes) { if (array_key_exists('tables', $changes) && is_array($changes['tables'] ) + && array_key_exists('tables', $changes['tables']) && array_key_exists('tables', $changes['tables']['change']) ) { foreach ($changes['tables']['change'] as $table_name => $table) { @@ -1445,7 +1446,7 @@ if (array_key_exists('add', $changes)) { foreach ($changes['add'] as $sequence_name => $sequence) { - $result = $this->createSequence($sequence_name, $sequence); + $result = $this->createSequence($sequence_name, $current_defini tion[$sequence_name]); if (PEAR::isError($result)) { return $result; }

Comments

 [2005-11-24 09:18 UTC] lsmith
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.