From: Reedy Date: Sat, 9 Sep 2017 16:11:24 +0000 (+0100) Subject: Quote $default in PostgresUpdater::setDefault X-Git-Tag: 1.31.0-rc.0~2130^2 X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=commitdiff_plain;h=bc12345f4bb7893030c31e1133abc4b20153f59b;hp=dd2156735afd8d4642ead06ddc0346766524dd00 Quote $default in PostgresUpdater::setDefault Bug: T175439 Change-Id: Id5f5f4f34c7b9ff9af4b706e3e126ba8fda6a0d5 --- diff --git a/includes/installer/PostgresUpdater.php b/includes/installer/PostgresUpdater.php index e5a5c9445c..07aeb13d1d 100644 --- a/includes/installer/PostgresUpdater.php +++ b/includes/installer/PostgresUpdater.php @@ -783,7 +783,8 @@ END; $info = $this->db->fieldInfo( $table, $field ); if ( $info->defaultValue() !== $default ) { $this->output( "Changing '$table.$field' default value\n" ); - $this->db->query( "ALTER TABLE $table ALTER $field SET DEFAULT " . $default ); + $this->db->query( "ALTER TABLE $table ALTER $field SET DEFAULT " + . $this->db->addQuotes( $default ) ); } }