Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] PrimaryReadReplica doesn't work #560

Open
gierappa opened this issue Aug 9, 2023 · 0 comments
Open

[BUG] PrimaryReadReplica doesn't work #560

gierappa opened this issue Aug 9, 2023 · 0 comments

Comments

@gierappa
Copy link

gierappa commented Aug 9, 2023

Function hasValidPrimaryReadReplicaConfig is a void function throwing only exceptions so if statement does not work.

if ($this->isPrimaryReadReplicaConfigured($driver)) {
    if($this->hasValidPrimaryReadReplicaConfig($driver)) {
        $connection_configuration = (new PrimaryReadReplicaConnection($this->config, $connection_configuration))->resolve($driver);
    }
}

Proposal:

if ($this->isPrimaryReadReplicaConfigured($driver)) {
    $this->hasValidPrimaryReadReplicaConfig($driver);
    $connection_configuration = (new PrimaryReadReplicaConnection($this->config, $connection_configuration))->resolve($driver);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant