CodeIgniter Forums
Database escaping bug since PHP update to 7.2.9 - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Development (https://forum.codeigniter.com/forum-6.html)
+--- Forum: Issues (https://forum.codeigniter.com/forum-19.html)
+--- Thread: Database escaping bug since PHP update to 7.2.9 (/thread-71656.html)



Database escaping bug since PHP update to 7.2.9 - petewulf1 - 09-10-2018

Hi there, 

i'm using CI version 3.1.4.

Since i've upgraded to PHP 7.2.9, Codeigniter is no more correctly escaping string values like "42,837645"  (like lat/lon). They get incorrectly identified as numbers and are not escaped with quotes which results in a database error.

My development system is based on windows with german locales, so floating point values are representated by comma. Maybe there is the root of the problem.

How to deal with this issue? Any help would be appreciated.

Thanks, Daniel


RE: Database escaping bug since PHP update to 7.2.9 - php_rocs - 09-10-2018

@petewulf1,

Any reason why you didn't upgrade to 3.1.9?

How where you handling values in the old version of CI?

Maybe a helper or library function that converts values for you.