PHP Classes

Call to a member function free() on a non-object

Recommend this page to a friend!

      Simple PHP MySQLi  >  All threads  >  Call to a member function free() on...  >  (Un) Subscribe thread alerts  
Subject:Call to a member function free() on...
Summary:Maybe error?
Messages:2
Author:Miodrag Ninkovic
Date:2014-01-27 13:26:03
Update:2014-02-04 04:19:55
 

  1. Call to a member function free() on...   Reply   Report abuse  
Picture of Miodrag Ninkovic Miodrag Ninkovic - 2014-01-27 13:26:04
I just upgraded your good class.
Found one error:

public function query( $query )
{
$full_query = $this->link->query( $query );
if( $this->link->error )
{
$this->log_db_errors( $this->link->error, $query, 3, "query" );
$full_query->free();
return false;
}
else
{
$full_query->free(); ---------Error line
return true;
}
}
I'm not using this function outside of class.
Do you may be know what is the problem?
Thank you

  2. Re: Call to a member function free() on...   Reply   Report abuse  
Picture of Bennett Stone Bennett Stone - 2014-02-04 04:19:55 - In reply to message 1 from Miodrag Ninkovic
Hi Miodrag!

I've fixed the error and updated the class