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)
Comment | File | Size | Author |
---|---|---|---|
htmltidy-php_notices_and_errors-20100328.patch | 21 KB | dman | |
Comments
Comment #1
michaelfavia CreditAttribution: michaelfavia commentedCommitted to Dev. Thank you for taking the time to do this. Ill test further this weekend and roll a release if it next week.
Comment #2
michaelfavia CreditAttribution: michaelfavia commentedsorry for spam