mirror of
https://github.com/kleeja-official/kleeja.git
synced 2025-12-24 00:39:40 +01:00
fixes
This commit is contained in:
@@ -420,10 +420,10 @@ class KleejaDatabase
|
|||||||
}
|
}
|
||||||
|
|
||||||
list($error_no, $error_msg) = $this->get_error();
|
list($error_no, $error_msg) = $this->get_error();
|
||||||
$error_sql = @current($this->debugr[$this->query_num+1]);
|
$error_sql = $this->query_num ? @current($this->debugr[$this->query_num+1]) : '';
|
||||||
|
|
||||||
//some ppl want hide their table names
|
//some ppl want hide their table names
|
||||||
if (! defined('DEV_STAGE')) {
|
if (! defined('DEV_STAGE') && $error_sql != '') {
|
||||||
$error_sql = preg_replace_callback("#\s{1,3}`*{$this->dbprefix}([a-z0-9]+)`*\s{1,3}#", function ($m) {
|
$error_sql = preg_replace_callback("#\s{1,3}`*{$this->dbprefix}([a-z0-9]+)`*\s{1,3}#", function ($m) {
|
||||||
return ' <span style="color:blue">' . substr($m[1], 0, 1) . '</span> ';
|
return ' <span style="color:blue">' . substr($m[1], 0, 1) . '</span> ';
|
||||||
}, $error_sql);
|
}, $error_sql);
|
||||||
|
|||||||
@@ -424,10 +424,10 @@ class KleejaDatabase
|
|||||||
}
|
}
|
||||||
|
|
||||||
list($error_no, $error_msg) = $this->get_error();
|
list($error_no, $error_msg) = $this->get_error();
|
||||||
$error_sql = @current($this->debugr[$this->query_num+1]);
|
$error_sql = $this->query_num ? @current($this->debugr[$this->query_num+1]) : '';
|
||||||
|
|
||||||
//some ppl want hide their table names
|
//some ppl want hide their table names
|
||||||
if (! defined('DEV_STAGE')) {
|
if (! defined('DEV_STAGE') && $error_sql != '') {
|
||||||
$error_sql = preg_replace_callback("#\s{1,3}`*{$this->dbprefix}([a-z0-9]+)`*\s{1,3}#", function ($m) {
|
$error_sql = preg_replace_callback("#\s{1,3}`*{$this->dbprefix}([a-z0-9]+)`*\s{1,3}#", function ($m) {
|
||||||
return ' <span style="color:blue">' . substr($m[1], 0, 1) . '</span> ';
|
return ' <span style="color:blue">' . substr($m[1], 0, 1) . '</span> ';
|
||||||
}, $error_sql);
|
}, $error_sql);
|
||||||
|
|||||||
Reference in New Issue
Block a user