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

Bug #11482 Call of addLang with existing languages with MDB2 results in error
Submitted: 2007-06-30 03:04 UTC
From: cms Assigned: quipo
Status: Closed Package: Translation2 (version 2.0.0beta12)
PHP Version: 5.2.1 OS: Linux 2.6.20
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 : 4 - 2 = ?

 
 [2007-06-30 03:04 UTC] cms (Carl Michael Skog)
Description: ------------ Trying to add languages with Translation2_Admin::addLang() results in error IFF there already exists languages result in an 'Already exists' error. Adding a 'return true' just before fall-off in the 'if (in_array()' if statement will fix the bug. Expected result: ---------------- true as return value Actual result: -------------- Error value

Comments

 [2007-06-30 03:14 UTC] cms (Carl Michael Skog)
The if statement I am referring to is in the class Translation2_Admin_Container_mdb2.
 [2007-06-30 09:19 UTC] quipo (Lorenzo Alberton)
Sorry, why is this a bug? If you're trying to add a language which already exists, then getting an "Already exists" error is exactly what I'd expect... Or maybe I didn't understand your problem?
 [2007-06-30 15:04 UTC] cms (Carl Michael Skog)
Where did I say that the new language to be added is already added ? You get that error if ANY language at all has been added before. The problem is that, even though, the code correctly identifies when it has to alter the table, execution still continues to the creation of the table, which, of course, results in a SQL error 'table already exists'.
 [2007-06-30 15:40 UTC] quipo (Lorenzo Alberton)
Oh, sorry, I hadn't fully understood what you said in the first comment. Fixed in CVS :-)