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

Bug #2057 typo which results in all notnulls == 0 being set as NOT NULL
Submitted: 2004-08-04 18:28 UTC
From: worker at mompopmedia dot com Assigned: lsmith
Status: Closed Package: MDB2
PHP Version: 5.0.0 OS: Mandrake 10
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 50 + 16 = ?

 
 [2004-08-04 18:28 UTC] worker at mompopmedia dot com
Description: ------------ in the xml schema format, if <notnull>0</notnull> all datatype drivers eval incorrectly. eg: $notnull = isset($field['notnull']) ? ' NOT NULL' : ''; which means $field['notnull'] = 0 evals to "Not NULL". it should be: $notnull = (isset($field['notnull']) && $field['notnull'] !== 0) ? ' NOT NULL' : ''; Thanks, michael

Comments

 [2004-08-05 12:24 UTC] smith at backendmedia dot com
I will commit a fix once I am done refactoring the MDB2_Manager class. If you are bored I wouldnt mind if you refacor the dumpDatabase() method to use a cleaner solution that separates the logic from the xml syntax. Maybe XML_Serializer would be a good choice.
 [2004-08-05 16:23 UTC] smith at backendmedia dot com
This bug has been fixed in CVS. In case this was a documentation problem, the fix will show up at the end of next Sunday (CET) on pear.php.net. In case this was a pear.php.net website problem, the change will show up on the website in short time. Thank you for the report, and for helping us make PEAR better.