- Patch #133216 by meba: trying to get property of non-object on line 982.

Backport from HEAD.
5.x
Neil Drumm 2007-04-08 00:56:46 +00:00
parent 588189982d
commit 815427e1da
1 changed files with 3 additions and 3 deletions

View File

@ -729,7 +729,7 @@ function _locale_import_one_string($op, $value = NULL, $mode = NULL, $lang = NUL
$plid = 0;
}
$loc = db_fetch_object(db_query("SELECT lid FROM {locales_source} WHERE source = '%s'", $english[$key]));
if ($loc->lid) { // a string exists
if (!empty($loc->lid)) { // a string exists
$lid = $loc->lid;
// update location field
db_query("UPDATE {locales_source} SET location = '%s' WHERE lid = %d", $comments, $lid);
@ -766,7 +766,7 @@ function _locale_import_one_string($op, $value = NULL, $mode = NULL, $lang = NUL
$english = $value['msgid'];
$translation = $value['msgstr'];
$loc = db_fetch_object(db_query("SELECT lid FROM {locales_source} WHERE source = '%s'", $english));
if ($loc->lid) { // a string exists
if (!empty($loc->lid)) { // a string exists
$lid = $loc->lid;
// update location field
db_query("UPDATE {locales_source} SET location = '%s' WHERE source = '%s'", $comments, $english);
@ -908,7 +908,7 @@ function _locale_import_parse_arithmetic($string) {
$topop = array_pop($opstk);
}
}
elseif ($prec[$ctok]) {
elseif (!empty($prec[$ctok])) {
// If it's an operator, then pop from $oparr into $elarr until the
// precedence in $oparr is less than current, then push into $oparr
$topop = array_pop($opstk);