File: locale.inc
Function: _locale_import_one_string($value, $mode, $lang = NULL)

    if ($hdr["Plural-Forms"] && $p = _locale_import_parse_plural_forms($hdr["Plural-Forms"], $file->filename)) {

$file->filename is not defined and cannot be replaced by something else because filename information is not passed to _locale_import_one_string.

What does this bug cause?

Nothing important.
If there is an error in the plural formula then the error message will not contain file name.

Comments

fgm’s picture

Status: Active » Needs review
StatusFileSize
new2.06 KB

Problem still exists in locale.inc 1.93, so I added the $file parameter needed by the function and fixed all calls needing it.

Some calls, both in locale.inc and install.inc do not need this parameter, because it only applies when $op == 'db-store'.

drumm’s picture

Version: x.y.z » 5.x-dev
Status: Needs review » Needs work

patching file includes/locale.inc
Hunk #1 succeeded at 535 (offset -1 lines).
Hunk #2 succeeded at 561 (offset -1 lines).
Hunk #3 succeeded at 635 (offset -1 lines).
Hunk #4 FAILED at 674.
1 out of 4 hunks FAILED -- saving rejects to file includes/locale.inc.rej

gábor hojtsy’s picture

Assigned: Unassigned » gábor hojtsy
Status: Needs work » Reviewed & tested by the community
StatusFileSize
new2.19 KB

Indeed, this is still a bug in current Drupal 6.x-dev as of today, so a fix should be in order for both Drupal 5.x and 6.x. Patch for Drupal 5.x-dev attached, please re-version for Drupal 6.x, once comitted.

meba’s picture

+1 for 6.x-dev. It's a blocker for me when developing autolocale.

gábor hojtsy’s picture

Version: 5.x-dev » 6.x-dev
StatusFileSize
new2.2 KB

OK, so since this did not get attention on Drupal 5.x, try to start this with Drupal 6.x-dev, after maybe we can get the fix accepted into Drupal 5.x. Patch against Drupal 6.x attached.

dries’s picture

Version: 6.x-dev » 5.x-dev

Committed to CVS HEAD. Needs to be committed to Drupal 5.

drumm’s picture

Status: Reviewed & tested by the community » Fixed

Committed to 5.

Anonymous’s picture

Status: Fixed » Closed (fixed)