Welcome Guest, Not a member yet? Register   Sign In
BUG/TYPO CI Version 3.1.8
#1

I just updated to CodeIgniter 3.1.8 and directly stumbled on a `typo` within the DB_query_builder.

If you use the following like, you will encounter a error:

PHP Code:
$this->db->like('field''value''BEFORE'); 


This will result in a Database Error like:
syntax error '%'value' ESCAPE '!' ...

The % is placed before the quotes.


Fix:
Edit the DB_query_builder.php file on line 973 from:
PHP Code:
case 'before':                    
$v "%'{$v}'";                
break; 

to:
PHP Code:
case 'before':                    
$v "'%{$v}'";                
break; 


Didn't saw a thread of this yet, in case i missed i'm sorry  Angel
Reply


Messages In This Thread
BUG/TYPO CI Version 3.1.8 - by nalletje - 04-26-2018, 05:50 AM
RE: BUG/TYPO CI Version 3.1.8 - by Paradinight - 04-26-2018, 01:30 PM



Theme © iAndrew 2016 - Forum software by © MyBB