mirror of
https://github.com/gnh1201/caterpillar.git
synced 2025-02-06 15:05:00 +00:00
Update index.php
This commit is contained in:
parent
bcaa4e76df
commit
1e3059c433
|
@ -239,6 +239,8 @@ function relay_mysql_query($params, $mysqli) {
|
|||
if ($pos !== false) {
|
||||
$query_type = strtolower(substr($query, 0, $pos));
|
||||
}
|
||||
|
||||
try {
|
||||
$query_result = $mysqli->query($query);
|
||||
|
||||
if ($mysqli->error) {
|
||||
|
@ -275,6 +277,16 @@ function relay_mysql_query($params, $mysqli) {
|
|||
"success" => $success,
|
||||
"result" => $result
|
||||
);
|
||||
} catch (Exception $e) {
|
||||
return array(
|
||||
"success" => false,
|
||||
"error" => array(
|
||||
"status" => 503,
|
||||
"code" => -1,
|
||||
"message" => $e->__toString()
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
function relay_sendmail($params) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user