Skip to content
Snippets Groups Projects
Commit 6e5851b3 authored by Dries Buytaert's avatar Dries Buytaert
Browse files

- Patch #338586 by Damien Tournoud: fix undefined function call in...

- Patch #338586 by Damien Tournoud: fix undefined function call in DatabaseSchema_pgsql::addField().
parent c01f85bc
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -247,7 +247,7 @@ public function addField(&$ret, $table, $field, $spec, $new_keys = array()) {
$spec['not null'] = FALSE;
}
$query = 'ALTER TABLE {' . $table . '} ADD COLUMN ';
$query .= $this->_createFieldSql($field, $this->_processField($spec));
$query .= $this->createFieldSql($field, $this->processField($spec));
$ret[] = update_sql($query);
if (isset($spec['initial'])) {
// All this because update_sql does not support %-placeholders.
......@@ -290,7 +290,7 @@ public function dropField(&$ret, $table, $field) {
* Default value to be set. NULL for 'default NULL'.
*/
public function fieldSetDefault(&$ret, $table, $field, $default) {
if ($default == NULL) {
if (is_null($default)) {
$default = 'NULL';
}
else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment