Last modified: 2014-02-18 15:51:20 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T63459, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 61459 - Undefined variable: IP
Undefined variable: IP
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
Translate (Other open bugs)
master
All All
: Unprioritized normal (vote)
: ---
Assigned To: Niklas Laxström
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-02-17 12:44 UTC by Jamie Thingelstad
Modified: 2014-02-18 15:51 UTC (History)
5 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Jamie Thingelstad 2014-02-17 12:44:46 UTC
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?
Comment 1 Jamie Thingelstad 2014-02-17 12:46:47 UTC
Should have indicated where I’m seeing this. Using MediaWiki 1.22.2.

https://wikiapiary.com/wiki/Special:Version
Comment 2 Gerrit Notification Bot 2014-02-18 10:55:45 UTC
Change 113939 had a related patch set uploaded by Nikerabbit:
$wgTranslateExtensionDirectory removed

https://gerrit.wikimedia.org/r/113939
Comment 3 Niklas Laxström 2014-02-18 11:04:44 UTC
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.
Comment 4 Gerrit Notification Bot 2014-02-18 11:07:17 UTC
Change 113939 merged by jenkins-bot:
$wgTranslateExtensionDirectory removed

https://gerrit.wikimedia.org/r/113939
Comment 5 Jamie Thingelstad 2014-02-18 12:34:41 UTC
(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.)
Comment 6 Nemo 2014-02-18 13:10:40 UTC
This specific issue is fixed, right?
Comment 7 Niklas Laxström 2014-02-18 15:51:20 UTC
In development branch.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links