diff -r 367768040a61 -r 4b858862c35c includes/wikiformat.php --- a/includes/wikiformat.php Wed Sep 30 20:01:23 2009 -0400 +++ b/includes/wikiformat.php Sun Oct 04 03:59:38 2009 -0400 @@ -152,7 +152,14 @@ } // execute rule + $text_before = $text; $text = $this->perform_render_step($text, $rule, $parser, $renderer); + if ( empty($text) ) + { + trigger_error("Wikitext was empty after rule \"$rule\"; restoring backup", E_USER_WARNING); + $text = $text_before; + } + unset($text_before); // run posthooks foreach ( $this->hooks as $hook )