SwiftlyTilting: usability, reusability

Friday, August 10, 2007

Winter 2.0.1 and Winter manual updated

I finished up the initial stages of the Winter 2.0 documentation today, so now you should be able to fully take advantage of all the new features. I noticed a few minor issues as I was documenting the code so I corrected them and have released the changes as Winter 2.0.1.

Change log:

  • Fixed some bugs with #eval
  • Changed the | (bitwise or) operator to ? since | is a reserved symbol in Winter (can’t believe I missed that one before!)
  • Improved #comment so that it does not evaluate code
  • Improved the escape character system

Download Winter 2.0.1
Downloaded 839 times


4 Comments Leave Comment | Comment RSS | TrackBack URL

I just installed Winter 2.0.1 on MediaWiki 1.10.0 with PHP 5.2.2. I did nothing other than place Winter.php in the Place Winter.php extensions directory and add ‘require_once(”extensions/Winter.php”);’ to the bottom of LocalSettings.php (similar to many other extensions I have installed). I started getting the error following error on all pages on my site immeditely after installing Winter:

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/Winter.php on line 1658

I’m very new to PHP but the documentation on my web host’s site seems to incdicate that I can change this setting (allow_call_time_pass_reference) but am advised not to (ie to change the offending PHP instead). Did I install something wrong? Does this PHP setting normally have to be changed when using Winter? Is this indicative of some other problem? Possibly a conflict with another extension I have installed already?

Any help would be greatly appreciated!

Graham.

Comment by Graham Lawlor — Saturday, August 11, 2007 @ 10:00 pm

Hi Graham,

Thanks for the heads up.. I will look into it further but I suspect if you remove the & before $arr on line 1658 the error message will go away.

edit: Well I’ve looked into it more but I can’t seem to reproduce your error message. A very similar call occurs on line 1643 so I don’t understand why that particular line would give an error message and in fact the call won’t work unless the code is like that.

edit again: I did a little more research and it seems the default setting for allow_call_time_pass_reference is on, though the “recommended” setting is to have it disabled. Unfortunately is it needed for the code, though I will see if I can accomplish it another way.

Comment by swiftlytilting — Saturday, August 11, 2007 @ 11:23 pm

Hi Graham,

I’ve solved the issue. I will release another version shortly. In the meantime you can change these lines to solve the problem:

Line 1643:
$ret = call_user_func($functionString[1],&$arr);
to
$ret = $functionString[1]($arr);

Line 1658
$ret = call_user_func($functionString[1],&$arr, $flag);
to
$ret = $functionString[1]($arr, $flag);

Thanks again for the bug report and please let me know if you experience any more problems. Also feel free to share any other comments you might have about Winter overall.

Comment by swiftlytilting — Sunday, August 12, 2007 @ 1:56 am

Hi - I just tried the workaround and the update (2.0.2) - both appear to work just as advertized. Thanks much for the quick fix!

Comment by Graham Lawlor — Sunday, August 12, 2007 @ 7:46 pm

Leave a Comment

Validate XHTML | Word Press