diff options
author | Stefan Andres Charsley <[email protected]> | 2014-01-12 11:07:34 +1300 |
---|---|---|
committer | Simon Holywell <[email protected]> | 2014-04-26 13:27:54 +0100 |
commit | 7b29b766fbe4b3db7601ef045b9c29e6b91736ea (patch) | |
tree | a05e8acfbb4e08b868c0a3e356da279e16e3d5b7 /idiorm.php | |
parent | 779f1ba4306c51f1366cdcab1a130e3da1627414 (diff) |
Added parameter array checking
Testing:
Checks the parameter array to ensure the correct number of values inside
the parameter with sequential integer indexes.
Production:
Strips out any non-integer indexes from the parameter array inside the
_log_query function.
Diffstat (limited to 'idiorm.php')
-rw-r--r-- | idiorm.php | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -439,6 +439,11 @@ self::$_query_log[$connection_name] = array(); } + // Strip out any non-integer indexes from the parameters + foreach($parameters as $key => $value) { + if (!is_int($key)) unset($parameters[$key]); + } + if (count($parameters) > 0) { // Escape the parameters $parameters = array_map(array(self::get_db($connection_name), 'quote'), $parameters); |