freeing a result object
[lhc/web/wiklou.git] / includes / Database.php
index 568f87a..8acd3d7 100644 (file)
@@ -237,7 +237,9 @@ class Database {
                if ( $res === false || !$this->numRows( $res ) ) {
                        return false;
                }
-               return $this->fetchObject( $res );
+               $obj = $this->fetchObject( $res );
+               $this->freeResult( $res );
+               return $obj;
        }
        
        # Removes most variables from an SQL query and replaces them with X or N for numbers.