Opened 17 years ago

Closed 16 years ago

#1027 closed Bug (worksforme)

Warning: Call-time pass-by-reference has been deprecated

Reported by: EK Owned by:
Priority: Normal Milestone:
Component: Project : MediaWiki+FCKeditor Version:
Keywords: Cc:

Description

Hello,

I getting the following warning when I install FCKeditor into mediawiki 1.10.1:

Warning: Call-time pass-by-reference has been deprecated - argument passed by value; If you would like to pass it by reference, modify the declaration of [runtime function name](). 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. However, future versions may not support this any longer. in C:\EasyPHP\www\mediawiki\extensions\FCKeditor\FCKeditorParser.body.php on line 173

Can someone help me to solve this? All your help will be much appreciated! Thanks

Change History (12)

comment:1 in reply to:  description Changed 17 years ago by EK

Solved this by replacing

$parserOutput = parent::parse($text, &$title, $options, $linestart , $clearState , $revid );

into

$parserOutput = parent::parse($text, $title, $options, $linestart , $clearState , $revid );

Replying to EK_123:

Hello,

I getting the following warning when I install FCKeditor into mediawiki 1.10.1:

Warning: Call-time pass-by-reference has been deprecated - argument passed by value; If you would like to pass it by reference, modify the declaration of [runtime function name](). 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. However, future versions may not support this any longer. in C:\EasyPHP\www\mediawiki\extensions\FCKeditor\FCKeditorParser.body.php on line 173

Can someone help me to solve this? All your help will be much appreciated! Thanks

comment:2 Changed 17 years ago by Wiktor Walc

Resolution: fixed
Status: newclosed

I also fixed it in SVN.
Thanks!

comment:3 Changed 17 years ago by Frederico Caldeira Knabben

Priority: HighNormal

comment:4 in reply to:  2 Changed 17 years ago by EK

Forgot to tell this:

Replace

function parse( $text, &$title, $options, $linestart = true, $clearState = true, $revid = null ) {

$parserOutput = parent::parse($text, &$title, $options, $linestart , $clearState , $revid );

with

function parse( $text, $title, $options, $linestart = true, $clearState = true, $revid = null ) {

$parserOutput = parent::parse($text, $title, $options, $linestart , $clearState , $revid );

(it is about the first line, I forgot to change that one also. If you do not change, you will have problem saving new pages.)

Replying to wwalc:

I also fixed it in SVN.
Thanks!

comment:5 Changed 17 years ago by Frederico Caldeira Knabben

Resolution: fixed
Status: closedreopened

comment:6 Changed 17 years ago by Wiktor Walc

Do you encounter any errors if there is &$title in the first line?

This is original declaration in Parser.php

public function parse( $text, &$title, $options, $linestart = true, $clearState = true, $revid = null ) {

...so same declaration should be in FCKeditorParser (with &$title).

The problem was that only in the line, where we were passing $title by reference: $parserOutput = parent::parse($text, &$title, $options, $linestart , $clearState , $revid ); (although title already has been declared to be passed by reference).

Please correct me if I missed something.

comment:7 in reply to:  6 Changed 17 years ago by EK

Yes, I do, that is why I replied again. I had to remove the "&" from the first line as well. If I dont do this, I cannot save pages anymore.

Replying to wwalc:

Do you encounter any errors if there is &$title in the first line?

This is original declaration in Parser.php

public function parse( $text, &$title, $options, $linestart = true, $clearState = true, $revid = null ) {

...so same declaration should be in FCKeditorParser (with &$title).

The problem was that only in the line, where we were passing $title by reference: $parserOutput = parent::parse($text, &$title, $options, $linestart , $clearState , $revid ); (although title already has been declared to be passed by reference).

Please correct me if I missed something.

comment:8 Changed 17 years ago by Wiktor Walc

I can't reproduce this error... could you let me know does any PHP error show up when &$title is in function declaration? (when saving page fails)

comment:9 in reply to:  8 Changed 17 years ago by EK

I just get a "Page not found" error. I tried everything, but nothing helped except removing the "&" (from title) from the first line.

comment:10 Changed 16 years ago by Wojciech Olchawa

Keywords: Pending added

comment:11 Changed 16 years ago by Frederico Caldeira Knabben

Keywords: Pending removed

comment:12 Changed 16 years ago by Wiktor Walc

Resolution: worksforme
Status: reopenedclosed

Sorry, I'm closing this as "worksforme" because I can't reproduce it (with allow_call_time_pass_reference = Off set in php.ini).

Changing $title into &$title in function declaration can't produce "Page not found" error, there must some additional thing that causes this error in your installation, check error log.

Declaration used in FCKeditorParser.body.php

parse( $text, &$title, $options, $linestart = true, $clearState = true, $revid = null )

is the same as in includes/Parser.php so there shouldn't be any problems with it.

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy