Bug Report #1260

Database::from() has pointless check for is_string() on each argument

Added by kurtiss - almost 3 years ago. Updated over 2 years ago.

Status:Closed Start date:
Priority:Normal Due date:
Assignee:Jeremy Bush % 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.

database.diff - Suggested Patch (485 Bytes) kurtiss -, 04/16/2009 12:38 am

Associated revisions

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.

Also available in: Atom PDF