Page MenuHomePhabricator

Undefined variable: IP
Closed, ResolvedPublic

Description

When installing Translate via Composer I’m seeing the following PHP Notice:

PHP Notice: Undefined variable: IP in .../w/extensions/Translate/Translate.php on line 514

Line 514 is:

$GLOBALS['wgTranslateExtensionDirectory'] = "$IP/extensions/";

It doesn't make sense to me why this would be the case. I’m thinking it has to do with using Composer and not having a direct require?


Version: master
Severity: normal

Details

Reference
bz61459

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 3:00 AM
bzimport set Reference to bz61459.

Should have indicated where I’m seeing this. Using MediaWiki 1.22.2.

https://wikiapiary.com/wiki/Special:Version

Change 113939 had a related patch set uploaded by Nikerabbit:
$wgTranslateExtensionDirectory removed

https://gerrit.wikimedia.org/r/113939

This went under our radar because

  1. we are not using the call_user_func( function () {} ) wrapper to remove global scope
  2. none of us is yet to use composer to install Translate
  3. $IP does not have 'wg' prefix

Our team is still discussing how to deal with composer in relation to MLEB.

Change 113939 merged by jenkins-bot:
$wgTranslateExtensionDirectory removed

https://gerrit.wikimedia.org/r/113939

(In reply to Niklas Laxström from comment #3)

Our team is still discussing how to deal with composer in relation to MLEB.

Just to chime in as a complete newcomer to the MLEB group of extensions, having Composer support makes me feel so much more comfortable with it. Notably the dependency management makes it much easier to just add Translate and then let Composer do the rest. I was happy to see it in there, and made installation more confident. So, +1 for full composer support across MLEB. (I had to manually install a couple of extensions still.)

This specific issue is fixed, right?