Last modified: 2010-05-15 15:51:56 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T11972, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 9972 - Support for Tidy PECL extension is broken for PHP 5
Support for Tidy PECL extension is broken for PHP 5
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
1.10.x
All All
: Normal minor (vote)
: ---
Assigned To: Nobody - You can work on this!
: patch, patch-need-review
: 6475 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-05-20 01:44 UTC by Michael Daly
Modified: 2010-05-15 15:51 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Changes to Parser.php for version neutral internalTidy($text) (2.11 KB, patch)
2007-05-20 01:44 UTC, Michael Daly
Details
Parser patch with only PHP5 code - tested w/ MW1.10 (1.23 KB, patch)
2007-05-20 16:37 UTC, Michael Daly
Details

Description Michael Daly 2007-05-20 01:44:37 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.
Comment 1 Aryeh Gregor (not reading bugmail, please e-mail directly) 2007-05-20 02:04:51 UTC
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.
Comment 2 Michael Daly 2007-05-20 16:37:16 UTC
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.
Comment 3 Joshua Kinard 2007-12-09 20:00:22 UTC
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!
Comment 4 Joshua Kinard 2007-12-09 20:01:30 UTC
*** Bug 6475 has been marked as a duplicate of this bug. ***
Comment 5 Michael Daly 2007-12-09 23:22:30 UTC
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.
Comment 6 Brion Vibber 2007-12-18 01:02:25 UTC
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...

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links