www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit b84181766df6edc436f4bb6e9e8a16d3107a3da2
parent cc726ef333ed4a4129d96371dee4e39154b0c1d1
Author: Dan Stillman <dstillman@zotero.org>
Date:   Tue, 12 Sep 2006 06:53:48 +0000

Fix bug in db.js::statementQuery() that prevented binding a single string parameter without putting it in an array

Also fixed array detection in flattenArguments() to handle a null value


Diffstat:
Mchrome/chromeFiles/content/scholar/xpcom/db.js | 2+-
Mchrome/chromeFiles/content/scholar/xpcom/scholar.js | 2+-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/chrome/chromeFiles/content/scholar/xpcom/db.js b/chrome/chromeFiles/content/scholar/xpcom/db.js @@ -172,7 +172,7 @@ Scholar.DB = new function(){ if (statement && params){ // If single parameter, wrap in an array - if (!params.length){ + if (typeof params != 'object' || params===null){ params = [params]; } diff --git a/chrome/chromeFiles/content/scholar/xpcom/scholar.js b/chrome/chromeFiles/content/scholar/xpcom/scholar.js @@ -306,7 +306,7 @@ var Scholar = new function(){ */ function flattenArguments(args){ // Put passed scalar values into an array - if (typeof args!='object'){ + if (typeof args!='object' || args===null){ args = [args]; }