PHP 7.0 - Update Query - setValues() - empty string value filtered out
When calling the setValues function, if the array contains a key/value pair with an empty string value, the key/value pair will be filtered out.
Looking at the code, there is an issue with the array_filter call where an empty string value is treated as false.
I just did a test, using the isset() function seems to work.
great @evanirla , but yes PHP does sees empty string as false when its used in a conditional statement, so will be good to avoid passing empty strings
Just hit this issue myself on 1.8.0. While PHP treats an empty string as false, in this context the outcome does not represent the intended behaviour and blocks a number of valid (and common) use cases. null, "", false, and any other falsey values should valid input for a field.