Last modified: 2010-05-15 15:51:56 UTC
Created attachment 3655 [details] Changes to Parser.php for version neutral internalTidy($text) Parser.php doesn't work with PHP5.x Rather than force users to make changes, just change code to be version aware and use appropriate function calls. I've made some changes and attached a diff as a patch (I hope that's the right way to do this). I tested it with PHP5.2 but not PHP4.x. Could someone test with PHP4.x and consider this for fixing this problem.
Note that PHP 4 has not been supported for over a year, since 1.7. Code to support it is unnecessary and will not be added.
Created attachment 3659 [details] Parser patch with only PHP5 code - tested w/ MW1.10 I redid the code for function internalTidy($text) to remove the PHP 4 code and only have PHP 5 support. Smaller and simpler.
Hah, I just ran into this when trying to get MW 1.11 to play nice on a NetWare box using the PHP5 Tidy and Apache's mod_tidy.nlm lib (because there isn't a native external tidy for NetWare), and had to mod Parser.php to use the PHP5 variants. My patch came out almost the exact same as yours, except for $tidy->getStatus. Anywho, if PHP4 hasn't been supported since 1.7, then I think it'd be nice to get this into the queue for 1.12 (or a 1.11 point release), since it'll help solve problems for those starting up new installs. I'm also marking another bug related to this as a dupe of this bug, since this actually contains a fix. Cheers!
*** Bug 6475 has been marked as a duplicate of this bug. ***
I don't suppose anyone's ever going to apply that patch to the trunk? If the bad code's in Parser.php and it's a minor change, it should be fixed.
Code in trunk (for 1.12) appears to have already replaced the old calls with newer ones using the object interface. Guess this is fixed as of r27667...