Home » Internationalization » Translation2 » Bug #6233
calling Translation2_Admin::add() adds tranlslation twice
Details
| Submitted | 2005-12-13 00:48 UTC |
|---|---|
| From | powtac at gmx dot de |
| Assigned | quipo |
| Status | Closed |
| Package | Translation2 |
| PHP Version | 5.1.0 |
| OS | WIN XP |
| Roadmaps | (Not assigned) |
Comments
[2005-12-13 00: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? http://pear.php.net/bugs/bug.php?id=2631&edit=2
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)