Modified slave validation
.gitignore composer.lock, and remove composer.lock from repo
This commit is contained in:
parent
142261d4e0
commit
c5ca7a83b2
2
.gitignore
vendored
2
.gitignore
vendored
@ -43,4 +43,4 @@ tests/_output/*
|
||||
/nbproject/*
|
||||
|
||||
# No need for composer.lock
|
||||
composer.lock
|
||||
/composer.lock
|
||||
1358
composer.lock
generated
1358
composer.lock
generated
File diff suppressed because it is too large
Load Diff
@ -47,7 +47,7 @@ class mysqlims extends mysqli
|
||||
throw new Exception("Failed to connect to MySQL: (".$this->mysqliW->connect_errno.") ".$this->mysqliW->connect_error);
|
||||
}
|
||||
|
||||
if ($this->mysqliR->connect_errno && $this->slave === true) {
|
||||
if ($this->slave === true && $this->mysqliR->connect_errno) {
|
||||
throw new Exception("Failed to connect to MySQL: (".$this->mysqliR->connect_errno.") ".$this->mysqliR->connect_error);
|
||||
}
|
||||
}
|
||||
@ -60,6 +60,7 @@ class mysqlims extends mysqli
|
||||
*/
|
||||
public function prepare($query)
|
||||
{
|
||||
mysqli::prepare($query);
|
||||
if (stripos($query, "SELECT") && stripos($query, "FOR UPDATE") === false && $this->slave !== false) {
|
||||
return $this->mysqliR->prepare($query);
|
||||
} else {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user