|Reported by:||Agent Orange||Owned by:||ryan|
I didn't like my comments to be altered by the wpautop-filter. To disable it I put a remove_filter('comment_text','wpautop') into my wp-comments.php. Now, that didn't work because Wordpress sorts the filters into different priorities in a very strange way. Because of this you need to tell remove_filter() in which priority it has to remove the filter. So the correct code for removing wpautop is remove_filter('comment_text', 'wpautop', 30).
Here's the bug: In priority class 30 theres only wpautop but if you remove it, the priority class stays in the array, pointing to null. When apply_filters() is called, it looks for the array of priorities for a certain text-identifier and executes a foreach($functions as $function). If the priority class is empty, $functions is a null-pointer here, and foreach outputs an error and halts the execution of the script.
See the original and corrected code in the attached file