Page MenuHomePhabricator

Notice/Warning for TranslationHelpers.php on line 629 is unhelpful
Closed, InvalidPublic

Description

[Thu Jan 29 08:48:34 2015] [hphp] [21364:7f5082bff700:319:000002] [] \nWarning: Invalid operand type was used: array_flip expects an array or collection in /srv/mediawiki/tags/2015-01-28_22:06:24/extensions/Translate/utils/TranslationHelpers.php on line 629
[Thu Jan 29 09:08:52 2015] [hphp] [21364:7f5082bff700:349:000001] [] \nNotice: Undefined index: codemap in /srv/mediawiki/tags/2015-01-28_22:06:24/extensions/Translate/utils/TranslationHelpers.php on line 629
[Thu Jan 29 09:08:52 2015] [hphp] [21364:7f5082bff700:349:000002] [] \nWarning: Invalid operand type was used: array_flip expects an array or collection in /srv/mediawiki/tags/2015-01-28_22:06:24/extensions/Translate/utils/TranslationHelpers.php on line 629

I have several of these in InTense. I certainly did something silly, like adding languages not yet recognised by MediaWiki (should be fixed), but I can't figure out what. Nikerabbit, can you make the logging slightly more verbose?

Event Timeline

Nemo_bis assigned this task to Nikerabbit.
Nemo_bis raised the priority of this task from to Medium.
Nemo_bis updated the task description. (Show Details)
Nemo_bis subscribed.

@Nemo_bis this is not logging I do. If you want stacktraces you can do

$wgDebugLogGroups['exception'] = ini_get( 'error_log' );
$wgDebugLogGroups['error'] = ini_get( 'error_log' );

but that does not give you the parameter values.

The error comes from Apertium suggestions (wtf1) as used in the non-TUX direct edit view (wtf2). You can unset $GLOBALS['wgTranslateTranslationServices']['Apertium'] and it should not try to use it.

Nikerabbit set Security to None.

Wouldn't that hide the problem?

If you can get more info and steps to reproduce, then we can see what kind of fix makes sense.

Wouldn't that hide the problem?

Apertium is now configured in InTense, so I can no longer test this bug there.

Nikerabbit lowered the priority of this task from Medium to Lowest.Feb 8 2015, 10:20 AM

This code no longer exists.