Bug Report #1260
Database::from() has pointless check for is_string() on each argument
| Status: | Closed | Start date: | ||
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | % Done: | 100% |
||
| Category: | Libraries:Database | |||
| Target version: | 2.3.3 | |||
| Resolution: | fixed | Points: |
Description
Problem: Currently, there is a call to trim($val), which has the effect of casting any non-string argument to a string. Immediately afterward is_string() is called to perform various mangling.
My use case: without this oversight, I'd be able to add a ->from($subquery) and have it execute successfully. As it is, my subquery gets mangled by the checking that happens after the is_string() check.
Fix:
Move the trim() call to the first line after the is_string() check.
Associated revisions
fixing #1260
History
Updated by John Heathco over 2 years ago
- Resolution set to fixed
Updated by John Heathco over 2 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
Applied in changeset r4342.