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
6fb12172
Commit
6fb12172
authored
Oct 20, 2016
by
pupi1985
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor refactoring of qa_db_fail_error
parent
dd800b30
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
qa-db.php
qa-include/qa-db.php
+5
-3
No files found.
qa-include/qa-db.php
View file @
6fb12172
...
...
@@ -108,13 +108,15 @@
global
$qa_db_fail_handler
;
@
error_log
(
'PHP Question2Answer MySQL '
.
$type
.
' error '
.
$errno
.
': '
.
$error
.
(
isset
(
$query
)
?
(
' - Query: '
.
$query
)
:
''
));
@
error_log
(
'PHP Question2Answer MySQL '
.
$type
.
' error '
.
$errno
.
': '
.
$error
.
(
isset
(
$query
)
?
(
' - Query: '
.
$query
)
:
''
));
if
(
function_exists
(
$qa_db_fail_handler
))
$qa_db_fail_handler
(
$type
,
$errno
,
$error
,
$query
);
else
{
echo
'<hr><font color="red">Database '
.
htmlspecialchars
(
$type
.
' error '
.
$errno
)
.
'<p>'
.
nl2br
(
htmlspecialchars
(
$error
.
"
\n\n
"
.
$query
));
echo
sprintf
(
'<hr><div style="color: red">Database %s<p>%s</p><code>%s</code></div>'
,
htmlspecialchars
(
$type
.
' error '
.
$errno
),
nl2br
(
htmlspecialchars
(
$error
)),
nl2br
(
htmlspecialchars
(
$query
))
);
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