Last modified: 2013-12-19 22:28:28 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 T49335, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 47335 - Parameter 1 to Language::findVariantLink() expected to be a reference, value given
Parameter 1 to Language::findVariantLink() expected to be a reference, value ...
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
1.22.0
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
: 44583 (view as bug list)
Depends on:
Blocks: 39480
  Show dependency treegraph
 
Reported: 2013-04-17 20:32 UTC by Siebrand Mazeland
Modified: 2013-12-19 22:28 UTC (History)
4 users (show)

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


Attachments

Description Siebrand Mazeland 2013-04-17 20:32:02 UTC
Observed in translatewiki.net production. Use case and impact currently unknown.

PHP Warning:  Parameter 1 to Language::findVariantLink() expected to be a reference, value given in includes/StubObject.php on line 79
Comment 1 Siebrand Mazeland 2013-04-17 20:34:58 UTC
Some background info: Has been observed once on given site. Last code update to master for core and extensions was about 15 minutes before the issue was logged (17-Apr-2013 20:27:45 UTC). The updated code was about 2 days worth.
Comment 2 Liangent 2013-04-18 09:09:59 UTC
Simple repro:

$ php maintenance/eval.php 
> $l=new StubUserLang;

> $n='1';

> $t=Title::newFromText($n);

> $l->findVariantLink($n,$t);
PHP Warning:  Parameter 1 to Language::findVariantLink() expected to be a reference, value given in ./includes/StubObject.php on line 79
PHP Stack trace:
PHP   1. {main}() ./maintenance/eval.php:0
PHP   2. eval() ./maintenance/eval.php:72
PHP   3. StubUserLang->findVariantLink() ./maintenance/eval.php(72) : eval()'d code:1
PHP   4. StubUserLang->__call() ./maintenance/eval.php(72) : eval()'d code:1
PHP   5. StubObject->_call() ./includes/StubObject.php:177
PHP   6. call_user_func_array() ./includes/StubObject.php:79

Warning: Parameter 1 to Language::findVariantLink() expected to be a reference, value given in ./includes/StubObject.php on line 79

Call Stack:
    0.0003     236024   1. {main}() ./maintenance/eval.php:0
   18.7853    8924472   2. eval('$l->findVariantLink($n,$t);;') ./maintenance/eval.php:72
   18.7853    8924672   3. StubUserLang->findVariantLink() ./maintenance/eval.php(72) : eval()'d code:1
   18.7853    8925112   4. StubUserLang->__call() ./maintenance/eval.php(72) : eval()'d code:1
   18.7853    8925144   5. StubObject->_call() ./includes/StubObject.php:177
   18.9612   10705640   6. call_user_func_array() ./includes/StubObject.php:79


>
Comment 3 Liangent 2013-04-18 09:14:49 UTC
A direct cause is that stub objects can't handle calls with references. However:

1) $wgContLang is never initialized as a stub object
2) findVariantLink() is always expected to run on $wgContLang

Looks as if something is calling findVariantLink() on $wgLang or similar stuff incorrectly? A backtrace would be useful...
Comment 4 Sam Reed (reedy) 2013-08-27 15:31:38 UTC
*** Bug 44583 has been marked as a duplicate of this bug. ***
Comment 5 Siebrand Mazeland 2013-12-19 22:28:28 UTC
Closing this as fixed. Not observed in a long time. The scenario from comment 2 can still be reproduced.

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


Navigation
Links