Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

remove PHP notices

  • Loading branch information...
commit 8fb98410f13c45171c5664c5e66de98d6e508d5a 1 parent 6ec4782
Javier Linares authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 extra/database.class.php
View
4 extra/database.class.php
@@ -34,7 +34,7 @@ private function query($type, $query, $string = '') {
}
// If needed, connect to database.
- if (!$this->{$type.'_handler'}) {
+ if (empty($this->{$type.'_handler'})) {
if ($type == 'master') {
global $db_host_master;
$host = $db_host_master;
@@ -108,7 +108,7 @@ public function close($type) {
mysqli_close($this->slave_handler);
}
}
- else if ($this->{$type.'_handler'} !== NULL) {
+ else if (isset($this->{$type.'_handler'}) && $this->{$type.'_handler'} !== NULL) {
mysqli_close($this->{$type.'_handler'});
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.