Skip to content
Snippets Groups Projects
Commit 78305a9e authored by Dries Buytaert's avatar Dries Buytaert
Browse files

- Patch #135846 by Gabor: killed two E_NOTICES

parent 083a6a27
No related branches found
No related tags found
No related merge requests found
......@@ -945,7 +945,7 @@ function _locale_import_one_string($op, $value = NULL, $mode = NULL, $lang = NUL
// update location field
db_query("UPDATE {locales_source} SET location = '%s' WHERE lid = %d", $comments, $lid);
$trans2 = db_fetch_object(db_query("SELECT lid, translation, plid, plural FROM {locales_target} WHERE lid = %d AND language = '%s'", $lid, $lang));
if (!$trans2->lid) { // no translation in current language
if (!isset($trans2->lid)) { // no translation in current language
db_query("INSERT INTO {locales_target} (lid, language, translation, plid, plural) VALUES (%d, '%s', '%s', %d, %d)", $lid, $lang, $trans, $plid, $key);
$additions++;
} // translation exists
......@@ -982,7 +982,7 @@ function _locale_import_one_string($op, $value = NULL, $mode = NULL, $lang = NUL
// update location field
db_query("UPDATE {locales_source} SET location = '%s' WHERE source = '%s'", $comments, $english);
$trans = db_fetch_object(db_query("SELECT lid, translation FROM {locales_target} WHERE lid = %d AND language = '%s'", $lid, $lang));
if (!$trans->lid) { // no translation in current language
if (!isset($trans->lid)) { // no translation in current language
db_query("INSERT INTO {locales_target} (lid, language, translation) VALUES (%d, '%s', '%s')", $lid, $lang, $translation);
$additions++;
} // translation exists
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment