Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Q
question2answer
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
outils
question2answer
Commits
3a5e3401
Commit
3a5e3401
authored
Oct 20, 2016
by
pupi1985
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove font tags and refactor qa_fatal_error
parent
473fabb7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
+10
-6
qa-base.php
qa-include/qa-base.php
+10
-6
No files found.
qa-include/qa-base.php
View file @
3a5e3401
...
...
@@ -689,14 +689,18 @@
{
if
(
qa_to_override
(
__FUNCTION__
))
{
$args
=
func_get_args
();
return
qa_call_override
(
__FUNCTION__
,
$args
);
}
echo
'Question2Answer fatal error:<p
><font color="red">'
.
qa_html
(
$message
,
true
)
.
'</font>
</p>'
;
@
error_log
(
'PHP Question2Answer fatal error: '
.
$message
);
echo
'Question2Answer fatal error:<p
style="color: red">'
.
qa_html
(
$message
,
true
)
.
'
</p>'
;
@
error_log
(
'PHP Question2Answer fatal error: '
.
$message
);
echo
'<p>Stack trace:<p>'
;
$backtrace
=
array_reverse
(
array_slice
(
debug_backtrace
(),
1
));
foreach
(
$backtrace
as
$trace
)
echo
'<font color="#'
.
((
strpos
(
@
$trace
[
'file'
],
'/qa-plugin/'
)
!==
false
)
?
'f00'
:
'999'
)
.
'">'
.
qa_html
(
@
$trace
[
'function'
]
.
'() in '
.
basename
(
@
$trace
[
'file'
])
.
':'
.@
$trace
[
'line'
])
.
'</font><br>'
;
$backtrace
=
array_reverse
(
array_slice
(
debug_backtrace
(),
1
));
foreach
(
$backtrace
as
$trace
)
{
$color
=
strpos
(
@
$trace
[
'file'
],
'/qa-plugin/'
)
!==
false
?
'red'
:
'#999'
;
echo
sprintf
(
'<code style="color: %s">%s() in %s:%s</code><br>'
,
$color
,
qa_html
(
@
$trace
[
'function'
]),
basename
(
@
$trace
[
'file'
]),
@
$trace
[
'line'
]
);
}
qa_exit
(
'error'
);
}
...
...
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