Skip to content

DL 18.1: boolean settings for postgres backend broken #71

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions