Home » File Formats » File_Gettext » Bug #6426
load() should empty $this->strings
Details
| Submitted | 2006-01-06 09:44 UTC |
|---|---|
| From | ivanwyc at gmail dot com |
| Assigned | mike |
| Status | Closed |
| Package | File_Gettext |
| PHP Version | Irrelevant |
| Roadmaps | (Not assigned) |
Comments
[2006-01-06 09:44 UTC] ivanwyc at gmail dot com
Description:
------------
diff -purb File.orig/Gettext/MO.php File/Gettext/MO.php
--- File.orig/Gettext/MO.php 2006-01-06 16:53:40.000000000 +0800
+++ File/Gettext/MO.php 2006-01-06 16:28:07.000000000 +0800
@@ -211,6 +211,7 @@ class File_Gettext_MO extends File_Gette
);
}
+ $this->strings = array();
// read all
for ($i = 0; $i < $count; $i++) {
$this->strings[$this->_readStr($original[$i])] =
diff -purb File.orig/Gettext/PO.php File/Gettext/PO.php
--- File.orig/Gettext/PO.php 2006-01-06 16:53:45.000000000 +0800
+++ File/Gettext/PO.php 2006-01-06 16:27:46.000000000 +0800
@@ -74,6 +74,7 @@ class File_Gettext_PO extends File_Gette
return parent::raiseError('No msgid/msgstr entries found');
}
+ $this->strings = array();
// get all msgids and msgtrs
for ($i = 0; $i < $matched; $i++) {
$msgid = substr(trim($matches[1][$i]), 1, -1);