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

Bug #6233 calling Translation2_Admin::add() adds tranlslation twice
Submitted: 2005-12-12 19:48 UTC Modified: 2005-12-15 03:54 UTC
From: powtac at gmx dot de Assigned: quipo
Status: Closed Package: Translation2
PHP Version: 5.1.0 OS: WIN XP
Roadmaps: (Not assigned)    

 [2005-12-12 19:48 UTC] powtac at gmx dot de
Description: ------------ I'm testing Translation2 for the first time. Perhaps I got some things wrong... When I try to add an translation Translation2 adds this translation twice under different Ids. Like '1'(string) and 1(int). (When I'm calling add one more time, Translation2 adds an other entry with Id '\'1\''(string)!) I think the function is called internally twice. Or there is a problem when the Id is int. But then there should be an error msg. Perhaps same problem here? Test script: --------------- $driver = 'MDB'; require_once 'Translation2/Admin.php'; $tr = Translation2_Admin::factory($driver, $dbinfo, $params); $tr->add(1, NULL, array('de' => 'Beispiel', 'en' => 'example')); Expected result: ---------------- One entry in the DB, no error msg page_id id en de NULL 1 example Beispiel Actual result: -------------- Two (three) entrys in the DB, no error msg page_id id en de NULL 1 example Beispiel NULL '1' example Beispiel ('NULL' '\'1\'' example Beispiel)


 [2005-12-15 03:54 UTC] quipo
sorry, there was some leftover code from revision 1.22 in the MDB driver. Please fetch the latest CVS version: