Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
D
drupal
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Custom Issue Tracker
Custom Issue Tracker
Labels
Merge Requests
302
Merge Requests
302
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
project
drupal
Commits
5d36a994
Commit
5d36a994
authored
Feb 18, 2015
by
alexpott
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue
#2174507
by jessebeach, alansaviolobo, tim.plunkett: Make debug() use print_r() by default
parent
1218fdf8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
core/includes/common.inc
core/includes/common.inc
+3
-3
core/modules/simpletest/src/Tests/SimpleTestTest.php
core/modules/simpletest/src/Tests/SimpleTestTest.php
+1
-1
No files found.
core/includes/common.inc
View file @
5d36a994
...
...
@@ -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
=
FALS
E
)
{
function
debug
(
$data
,
$label
=
NULL
,
$print_r
=
TRU
E
)
{
// Print $data contents to string.
$string
=
String
::
checkPlain
(
$print_r
?
print_r
(
$data
,
TRUE
)
:
var_export
(
$data
,
TRUE
));
...
...
core/modules/simpletest/src/Tests/SimpleTestTest.php
View file @
5d36a994
...
...
@@ -210,7 +210,7 @@ function stubTest() {
$this
->
assertNothing
();
// This causes the debug message asserted in confirmStubResults().
debug
(
'Foo'
,
'Debug'
);
debug
(
'Foo'
,
'Debug'
,
FALSE
);
}
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment