Skip to content

DL 18.1: boolean settings for postgres backend broken #71

@wavexx

Description

@wavexx

Reported by Dima Veselov:

Main problem is that PostgreSQL unlike others do not accept boolean as 1 or 0 - only as true or false.

I managed to make this work changing code to: ticketfunc.php:122
$sql .= ", " . (!isset($params["pass_send"])? 'false': to_boolean($params["pass_send"]));

func.php:

function to_boolean($v)
{
  if($v === 1 || $v === "1" || $v === "true") {error_log("FIRE
$v");return "true";}
  elseif($v === 0 || $v === "0" || $v === "false" || $v === FALSE)
return "false";
  return null;
}

Sorry, can't check if this break other database logic. Also,
dbupgrade.php should be remastered, I executed it manually.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions