• 1 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Call to a member function real_escape_string() on a non-object

#11
(09-02-2015, 01:57 PM)Narf Wrote:
(09-02-2015, 10:47 AM)Mdev Wrote: I have the same problem although i have the autoinit set.
I needed to do this inside the

Quote:C:\work\Codefi UI\codeigniter\system\database\drivers\mysqli\mysqli_driver.php
to make the error go away.


Code:
// --------------------------------------------------------------------

/**
* Platform-dependant string escape
*
* @param    string
* @return    string
*/
protected function _escape_str($str)
{
    if($this->conn_id)
    {
        return $this->conn_id->real_escape_string($str);
    }
}

DO NOT DO THIS! You're making yourself vulnerable to SQL injections!

What do you suggest? I got the same problem
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2018 MyBB Group.