Last modified: 2010-09-23 19:25:52 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 T27273, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 25273 - Message::params() triggers a fatal error
Message::params() triggers a fatal error
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
User blocking (Other open bugs)
1.17.x
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
: patch
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-09-23 19:09 UTC by Antoine "hashar" Musso (WMF)
Modified: 2010-09-23 19:25 UTC (History)
1 user (show)

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


Attachments
trivial patch to solve a fatal error (505 bytes, patch)
2010-09-23 19:09 UTC, Antoine "hashar" Musso (WMF)
Details

Description Antoine "hashar" Musso (WMF) 2010-09-23 19:09:59 UTC
Created attachment 7697 [details]
trivial patch to solve a fatal error

I had a fatal error while running phpunit tests with r73625.

The cause is that Message::params() incorrectly use func_get_args which can not be used as a second parameter of a function. The bug appears with PHP 5.2.12 (under Mac OS X 1.5).

How to trigger it :
<?php
function f1() {
 print_r( array_merge(
    array_values( func_get_args() )
 )); }
 
function f2() {
 print_r( array_merge(
    array(), // push func_get_args as a second parameter
    array_values( func_get_args() )
 )); }
 
print "Calling f1:\n";
f1( array() );
print "Calling f2:\n";
f2( array() );

Please find attached a patch that push func_get_args() result in an array.
Comment 1 Niklas Laxström 2010-09-23 19:25:52 UTC
r73628

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


Navigation
Links