ccmbenchmark / ting

Lightweight PHP datamapper
http://tech.ccmbg.com/ting/doc/3.x/en/index.html
Apache License 2.0
1 stars 5 forks source link

Fix: boolean values support in non-prepared query #59

Closed vgreb closed 2 years ago

vgreb commented 2 years ago
Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Licence Apache-2.0
Fixed tickets
xavierleune commented 2 years ago

Thanks for your PR, I can see some improvements:

what do you think ?

vgreb commented 2 years ago

Hi,

I had to explicitly return 'null' otherwise the tests do not pass (cf. previous runs https://github.com/ccmbenchmark/ting/actions/runs/2147218060).

I will improve tests to verify generated output.

vgreb commented 2 years ago

After further investigation, here the explication why we need to return 'null':

call to preg_replace_callback will cast null into a empty string (cf. example)