Commit 40991843 authored by Robert Lyon's avatar Robert Lyon Committed by Gerrit Code Review
Browse files

Adjusting get_column_sql() default value to false (Bug #1384473)

On install an error was being thrown:

In Postgres:
Failed to get a recordset: postgres7 error: [-1: ERROR: bind message
supplies 1 parameters, but prepared statement "" requires 0] in
adodb_throw(SELECT name FROM "blocktype_installed" WHERE name IN
('profileinfo','myviews','mygroups','myfriends','wall'), Array)

In Mysql:
Failed to get a recordset: mysqli error: [1064: You have an error in
your SQL syntax; check the manual that corresponds to your MySQL
server version for the right syntax to use near 'NULL' at line 1] in
adodb_throw(SELECT name FROM "blocktype_installed" WHERE name IN
('profileinfo','myviews','mygroups','myfriends','wall')NULL, )

Change-Id: Ifd74ccfce5c8352db2fdc55378f9eede236354c7
Signed-off-by: Robert Lyon's avatarRobert Lyon <>
parent 86738f46
......@@ -826,7 +826,12 @@ function get_column_sql($sql, $values=null) {
$sql = db_quote_table_placeholders($sql);
try {
return $db->GetCol($sql, $values);
if (!empty($values) && is_array($values) && count($values) > 0) {
return $db->GetCol($sql, $values);
else {
return $db->GetCol($sql);
catch (ADODB_Exception $e) {
throw new SQLException(create_sql_exception_message($e, $sql, $values));
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment