Opened 18 years ago
Closed 17 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 Changed 18 years ago by
comment:2 follow-up: 4 Changed 18 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
I also fixed it in SVN.
Thanks!
comment:3 Changed 18 years ago by
Priority: | High → Normal |
---|
comment:4 Changed 18 years ago by
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 18 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
comment:6 follow-up: 7 Changed 18 years ago by
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 Changed 18 years ago by
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 follow-up: 9 Changed 18 years ago by
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 Changed 18 years ago by
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 17 years ago by
Keywords: | Pending added |
---|
comment:11 Changed 17 years ago by
Keywords: | Pending removed |
---|
comment:12 Changed 17 years ago by
Resolution: | → worksforme |
---|---|
Status: | reopened → closed |
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.
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: