Permalink
Browse files

remove PHP notices

  • Loading branch information...
1 parent 6ec4782 commit 8fb98410f13c45171c5664c5e66de98d6e508d5a Javier Linares committed Mar 23, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 extra/database.class.php
View
@@ -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'});
}
}

0 comments on commit 8fb9841

Please sign in to comment.