Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Wikipedia: Wikitech

Re: [MediaWiki-CVS] SVN: [38704] trunk/extensions/Translate/MessageChecks.php

 

 

Wikipedia wikitech RSS feed   Index | Next | Previous | View Threaded


rotemliss at gmail

Aug 6, 2008, 4:43 AM

Post #1 of 3 (323 views)
Permalink
Re: [MediaWiki-CVS] SVN: [38704] trunk/extensions/Translate/MessageChecks.php

nikerabbit[at]svn.wikimedia.org wrote:
> Revision: 38704
> Author: nikerabbit
> Date: 2008-08-06 10:57:38 +0000 (Wed, 06 Aug 2008)
>
> Log Message:
> -----------
> * Revert r38702
> Warning: array_splice() [function.array-splice]: The first argument should be an array in /var/www/sandwiki/extensions/Translate/TranslateEditAddons.php on line 263
> Warning: Missing argument 2 for wfMsgExt() in /var/www/sandwiki/includes/GlobalFunctions.php on line 613
> Notice: Undefined variable: options in /var/www/sandwiki/includes/GlobalFunctions.php on line 620
> Notice: Undefined variable: options in /var/www/sandwiki/includes/GlobalFunctions.php on line 621
>

Where (i.e. in which page exactly) are the errors shown?


_______________________________________________
Wikitech-l mailing list
Wikitech-l[at]lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


niklas.laxstrom at gmail

Aug 6, 2008, 9:15 AM

Post #2 of 3 (300 views)
Permalink
Re: [MediaWiki-CVS] SVN: [38704] trunk/extensions/Translate/MessageChecks.php [In reply to]

On 06/08/2008, Rotem Liss <rotemliss[at]gmail.com> wrote:
> nikerabbit[at]svn.wikimedia.org wrote:
> > Revision: 38704
> > Author: nikerabbit
> > Date: 2008-08-06 10:57:38 +0000 (Wed, 06 Aug 2008)
> >
> > Log Message:
> > -----------
> > * Revert r38702
> > Warning: array_splice() [function.array-splice]: The first argument should be an array in /var/www/sandwiki/extensions/Translate/TranslateEditAddons.php on line 263
> > Warning: Missing argument 2 for wfMsgExt() in /var/www/sandwiki/includes/GlobalFunctions.php on line 613
> > Notice: Undefined variable: options in /var/www/sandwiki/includes/GlobalFunctions.php on line 620
> > Notice: Undefined variable: options in /var/www/sandwiki/includes/GlobalFunctions.php on line 621
> >
>
>
> Where (i.e. in which page exactly) are the errors shown?

When editing any message that has warnings. The reference doesn't
produce any warnings in our version of PHP 5.2.3.

--
Niklas Laxström

_______________________________________________
Wikitech-l mailing list
Wikitech-l[at]lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


rotemliss at gmail

Aug 6, 2008, 9:47 AM

Post #3 of 3 (301 views)
Permalink
Re: [MediaWiki-CVS] SVN: [38704] trunk/extensions/Translate/MessageChecks.php [In reply to]

Niklas Laxström wrote:
> On 06/08/2008, Rotem Liss <rotemliss[at]gmail.com> wrote:
>> nikerabbit[at]svn.wikimedia.org wrote:
>> > Revision: 38704
>> > Author: nikerabbit
>> > Date: 2008-08-06 10:57:38 +0000 (Wed, 06 Aug 2008)
>> >
>> > Log Message:
>> > -----------
>> > * Revert r38702
>> > Warning: array_splice() [function.array-splice]: The first argument should be an array in /var/www/sandwiki/extensions/Translate/TranslateEditAddons.php on line 263
>> > Warning: Missing argument 2 for wfMsgExt() in /var/www/sandwiki/includes/GlobalFunctions.php on line 613
>> > Notice: Undefined variable: options in /var/www/sandwiki/includes/GlobalFunctions.php on line 620
>> > Notice: Undefined variable: options in /var/www/sandwiki/includes/GlobalFunctions.php on line 621
>> >
>>
>>
>> Where (i.e. in which page exactly) are the errors shown?
>
> When editing any message that has warnings. The reference doesn't
> produce any warnings in our version of PHP 5.2.3.
>

The warning about the reference depends on the configuration in php.ini. The
full warning is:

Warning: Call-time pass-by-reference has been deprecated; If you would like to
pass it by reference, modify the declaration of call_user_func(). If you would
like to enable call-time pass-by-reference, you can set
allow_call_time_pass_reference to true in your INI file. in
[]/extensions/Translate/MessageChecks.php on line 60

I see the warnings you noted, though: as written in
http://www.php.net/call_user_func , the function call_user_func does not support
passing variables by references, regardless of the function declaration.

To prevent both kinds of warnings, I suggest using the following syntax:

$this->$check( $message, $code, $warning )

It should work in PHP 5 (and possibly earlier), passes variables by references
if necessary, and shows no warnings in my installation.

_______________________________________________
Wikitech-l mailing list
Wikitech-l[at]lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Wikipedia wikitech RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.