Make sure that the session actually contains a slave connection before trying to use it. Fixes bug #12305
This commit is contained in:
parent
45d7c5505f
commit
fd4b75b2b2
2 changed files with 3 additions and 4 deletions
|
|
@ -232,12 +232,10 @@ sub dbSlave {
|
|||
$self->{_slave} = WebGUI::SQL->connect($self, $slave->{dsn},$slave->{user},$slave->{pass});
|
||||
}
|
||||
}
|
||||
if (!exists $self->{_slave}) {
|
||||
return $self->db;
|
||||
}
|
||||
else {
|
||||
if (exists $self->{_slave} && $self->{_slave}) {
|
||||
return $self->{_slave};
|
||||
}
|
||||
return $self->db;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue