mssql driver doesn’t have a CI object needed to use Input library |
|||
|---|---|---|---|
| Date: | 10/06/2008 | Severity: | Critical |
| Status: | Resolved | Reporter: | krsanky |
| Version: | 1.7.0 SVN | ||
| Keywords: | Libraries, Database Class | ||
Description
I update a working 1.6.3 site to svn.
I get an error:
Message: Undefined property: CI_DB_mssql_driver::$input
Filename: mssql/mssql_driver.php
Line Number: 217
I updated line 217 to add the ->CI before ->input.
Then that broke because the super class doesn’t setup a “CI” object. I added the CI object to the super class, and everything worked again.
Code Sample
file DB_driver.php:
add "$this->CI =& get_instance();" to the constructor.
file mssql_driver:
change line 217 to this:
return str_replace("'", "''",
$this->CI->input->_remove_invisible_characters($str));
Expected Result
page loads without error
Actual Result
page loads with error
Comment on Bug Report
| Posted by: Rick Ellis on 6 October 2008 5:44pm | |
|
|
Thanks. Fixed in SVN. |
| Posted by: krsanky on 6 October 2008 6:21pm | |
|
|
You added the fix to mssql_driver.php , but not DB_driver.php ? If I do a svn up I still get: Filename: mssql/mssql_driver.php
|
| Posted by: Rick Ellis on 6 October 2008 6:29pm | |
|
|
Whoops! I assumed the object was already set in the main driver. Fixed now… |
| Posted by: krsanky on 6 October 2008 6:37pm | |
|
|
try again? Message: Undefined variable: CI change: to: |
| Posted by: Rick Ellis on 6 October 2008 6:42pm | |
|
|
Oh man… time for me to step away from the computer… OK, fixed. |
