https://bugzilla.wikimedia.org/show_bug.cgi?id=25273

           Summary: Message::params() triggers a fatal error
           Product: MediaWiki
           Version: 1.17-svn
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: patch
          Severity: normal
          Priority: Normal
         Component: Blocking
        AssignedTo: wikibugs-l@lists.wikimedia.org
        ReportedBy: has...@free.fr


Created attachment 7697
  --> https://bugzilla.wikimedia.org/attachment.cgi?id=7697
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.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to