aboutsummaryrefslogtreecommitdiffstats
path: root/include/dba.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/dba.php')
-rw-r--r--include/dba.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/dba.php b/include/dba.php
index 8a9d599c4..1421a703d 100644
--- a/include/dba.php
+++ b/include/dba.php
@@ -54,10 +54,10 @@ if(! class_exists('dba')) {
if(class_exists('mysqli')) {
$this->db = new mysqli($server,$user,$pass,$db);
- if(NULL === $this->db->connect_error()) {
+ if(NULL === $this->db->connect_error) {
$this->connected = true;
} else {
- throw new RuntimeException($this->db->connect_error());
+ throw new RuntimeException($this->db->connect_error);
}
} else {
$this->mysqli = false;
@@ -81,7 +81,7 @@ if(! class_exists('dba')) {
public function q($sql) {
if((! $this->db) || (! $this->connected)) {
- throwOrLog(new RuntimeException(t("There is no db connection. ")));
+ $this->throwOrLog(new RuntimeException(t("There is no db connection. ")));
return;
}
@@ -121,7 +121,7 @@ if(! class_exists('dba')) {
}
logger('dba: ' . $str );
if(FALSE===$result) {
- throwOrLog(new RuntimeException('dba: ' . $str));
+ $this->throwOrLog(new RuntimeException('dba: ' . $str));
return;
}
}