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
0e16e16c
Commit
0e16e16c
authored
Apr 25, 2016
by
catch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Issue
#2688615
by rballou, dawehner: Add the file to Error::formatBacktrace()"
This reverts commit
0d77fa57
.
parent
ac6a085a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
10 deletions
+6
-10
core/lib/Drupal/Core/Utility/Error.php
core/lib/Drupal/Core/Utility/Error.php
+1
-5
core/tests/Drupal/Tests/Core/Utility/ErrorTest.php
core/tests/Drupal/Tests/Core/Utility/ErrorTest.php
+5
-5
No files found.
core/lib/Drupal/Core/Utility/Error.php
View file @
0e16e16c
...
...
@@ -177,11 +177,7 @@ public static function formatBacktrace(array $backtrace) {
$line
=
''
;
if
(
isset
(
$trace
[
'line'
]))
{
$line
=
" (Line:
{
$trace
[
'line'
]
}
"
;
if
(
isset
(
$trace
[
'file'
]))
{
$line
.
=
':'
.
$trace
[
'file'
];
}
$line
.
=
")"
;
$line
=
" (Line:
{
$trace
[
'line'
]
}
)"
;
}
$return
.
=
$call
[
'function'
]
.
'('
.
implode
(
', '
,
$call
[
'args'
])
.
")
$line
\n
"
;
...
...
core/tests/Drupal/Tests/Core/Utility/ErrorTest.php
View file @
0e16e16c
...
...
@@ -84,28 +84,28 @@ public function providerTestFormatBacktrace() {
$data
=
array
();
// Test with no function, main should be in the backtrace.
$data
[]
=
array
(
array
(
$this
->
createBacktraceItem
(
NULL
,
NULL
)),
"main() (Line: 10
:test_file
)
\n
"
);
$data
[]
=
array
(
array
(
$this
->
createBacktraceItem
(
NULL
,
NULL
)),
"main() (Line: 10)
\n
"
);
$base
=
array
(
$this
->
createBacktraceItem
());
$data
[]
=
array
(
$base
,
"test_function() (Line: 10
:test_file
)
\n
"
);
$data
[]
=
array
(
$base
,
"test_function() (Line: 10)
\n
"
);
// Add a second item.
$second_item
=
$base
;
$second_item
[]
=
$this
->
createBacktraceItem
(
'test_function_2'
);
$data
[]
=
array
(
$second_item
,
"test_function() (Line: 10
:test_file)
\n
test_function_2() (Line: 10:test_file
)
\n
"
);
$data
[]
=
array
(
$second_item
,
"test_function() (Line: 10
)
\n
test_function_2() (Line: 10
)
\n
"
);
// Add a second item, with a class.
$second_item_class
=
$base
;
$second_item_class
[]
=
$this
->
createBacktraceItem
(
'test_function_2'
,
'TestClass'
);
$data
[]
=
array
(
$second_item_class
,
"test_function() (Line: 10
:test_file)
\n
TestClass->test_function_2() (Line: 10:test_file
)
\n
"
);
$data
[]
=
array
(
$second_item_class
,
"test_function() (Line: 10
)
\n
TestClass->test_function_2() (Line: 10
)
\n
"
);
// Add a second item, with a class.
$second_item_args
=
$base
;
$second_item_args
[]
=
$this
->
createBacktraceItem
(
'test_function_2'
,
NULL
,
array
(
'string'
,
10
,
new
\
stdClass
()));
$data
[]
=
array
(
$second_item_args
,
"test_function() (Line: 10
:test_file)
\n
test_function_2('string', 10, Object) (Line: 10:test_file
)
\n
"
);
$data
[]
=
array
(
$second_item_args
,
"test_function() (Line: 10
)
\n
test_function_2('string', 10, Object) (Line: 10
)
\n
"
);
return
$data
;
}
...
...
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