From: Ævar Arnfjörð Bjarmason Date: Sun, 8 Jan 2006 10:29:26 +0000 (+0000) Subject: * Using var_dump() with output buffering instead of print_r(), allows for X-Git-Tag: 1.6.0~697 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22articles%22%2C%22id_article=%24id_article%22%29%20.%20%22?a=commitdiff_plain;h=9e0bc47685d0f06d33cf0b19c0648c0f94bf0c0d;p=lhc%2Fweb%2Fwiklou.git * Using var_dump() with output buffering instead of print_r(), allows for distinguishing between an empty string and NULL * Formatting * Documentation: @copyright... --- diff --git a/maintenance/parserTestsParserHook.php b/maintenance/parserTestsParserHook.php index 56d1e6bd6c..ae50ee7f70 100644 --- a/maintenance/parserTestsParserHook.php +++ b/maintenance/parserTestsParserHook.php @@ -1,5 +1,6 @@ + * @copyright Copyright © 2005, 2006 Ævar Arnfjörð Bjarmason * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later */ @@ -18,8 +20,12 @@ function wfParserTestSetup( &$parser ) { } function wfParserTestHook( $in, $argv ) { - if ( count( $argv ) ) - return "
\n" . print_r( $argv, true ) . '
'; - else - return $in; + ob_start(); + var_dump( + $in, + $argv + ); + $ret = ob_get_clean(); + + return "
\n$ret
"; }