diff options
| -rw-r--r-- | adodb.inc.php | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/adodb.inc.php b/adodb.inc.php index 973900ad..7d14d7ce 100644 --- a/adodb.inc.php +++ b/adodb.inc.php @@ -1153,13 +1153,15 @@ if (!defined('_ADODB_LAYER')) { return $ret; } - //Strips keyword used to help generate SELECT COUNT(*) queries from SQL if it exists. - function adodb_strip_count_keyword( $sql ) { - return ADODB_str_replace( '_ADODB_COUNT', '', $sql ); - } - function _Execute($sql,$inputarr=false) { - $sql = $this->adodb_strip_count_keyword( $sql ); + // ExecuteCursor() may send non-string queries (such as arrays), + // so we need to ignore those. + if( is_string($sql) ) { + // Strips keyword used to help generate SELECT COUNT(*) queries + // from SQL if it exists. + $sql = ADODB_str_replace( '_ADODB_COUNT', '', $sql ); + } + if ($this->debug) { global $ADODB_INCLUDED_LIB; if (empty($ADODB_INCLUDED_LIB)) { |
