Skip to content

Commit

Permalink
Fixed an issue in the destructor
Browse files Browse the repository at this point in the history
...which would trigger a warning message if there were no queries
  • Loading branch information
stefangabos committed Feb 10, 2015
1 parent e6fea5a commit ba69b01
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Zebra_Database.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
* For more resources visit {@link http://stefangabos.ro/}
*
* @author Stefan Gabos <[email protected]>
* @version 2.8.6 (last revision: December 28, 2014)
* @copyright (c) 2006 - 2014 Stefan Gabos
* @version 2.8.7 (last revision: February 10, 2015)
* @copyright (c) 2006 - 2015 Stefan Gabos
* @license http://www.gnu.org/licenses/lgpl-3.0.txt GNU LESSER GENERAL PUBLIC LICENSE
* @package Zebra_Database
*/
Expand Down Expand Up @@ -4415,7 +4415,7 @@ function __destruct()
{

// if the last result is a mysqli result set (it can also be a boolean or not set)
if ($this->last_result instanceof mysqli_result)
if (isset($this->last_result) && $this->last_result instanceof mysqli_result)

// frees the memory associated with the last result
mysqli_free_result($this->last_result);
Expand Down

0 comments on commit ba69b01

Please sign in to comment.