Commit 5d36a994 authored by alexpott's avatar alexpott

Issue #2174507 by jessebeach, alansaviolobo, tim.plunkett: Make debug() use print_r() by default

parent 1218fdf8
......@@ -1662,10 +1662,10 @@ function _drupal_flush_css_js() {
* Label to prefix the data.
* @param $print_r
* Flag to switch between print_r() and var_export() for data conversion to
* string. Set $print_r to TRUE when dealing with a recursive data structure
* as var_export() will generate an error.
* string. Set $print_r to FALSE to use var_export() instead of print_r().
* Passing recursive data structures to var_export() will generate an error.
*/
function debug($data, $label = NULL, $print_r = FALSE) {
function debug($data, $label = NULL, $print_r = TRUE) {
// Print $data contents to string.
$string = String::checkPlain($print_r ? print_r($data, TRUE) : var_export($data, TRUE));
......
......@@ -210,7 +210,7 @@ function stubTest() {
$this->assertNothing();
// This causes the debug message asserted in confirmStubResults().
debug('Foo', 'Debug');
debug('Foo', 'Debug', FALSE);
}
/**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment