I have PHP warnings on, and the current dev of htmltidy complains all over the place.

So I went in and fixed all them up - ensuring that values were set before they were being read etc.
In the process I discovered at least 5 spots where the boring complaint were valid - settings data was genuinely being lost or ignored thank to renaming or typos somewhere in the past. n this case, following up all the trivial PHP STRICT issues did indeed produce better code and identify several real bugs. Sometimes this happens :-)

So here's a reasonably sweeping fix of the stuff that was easy to spot. Just basic code clean-up really, plus a more globally concise way of dealing with 'default' settings.

... plus another 16 code style fix-ups to bring it into line with Drupal standards and the coder.module review.

I see three other outstanding left-over issues, but not sure I want to mess with them tonight.
(the useless use of variable_get('htmltidy_process_input') in htmltidy_nodeapi, the lack of the option to actually save the repaired text (where did that go?!), and the broken-ness of the debugging clause inside htmltidy_string() - that just can't currently work)

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

michaelfavia’s picture

Committed to Dev. Thank you for taking the time to do this. Ill test further this weekend and roll a release if it next week.

michaelfavia’s picture

Status: Needs review » Fixed

sorry for spam

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.