Quote $default in PostgresUpdater::setDefault
[lhc/web/wiklou.git] / includes / installer / PostgresUpdater.php
index e5a5c94..07aeb13 100644 (file)
@@ -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 ) );
                }
        }