diff --git a/system/Database/BaseConnection.php b/system/Database/BaseConnection.php index 487f01df4ccb..65bf6fcdbdac 100644 --- a/system/Database/BaseConnection.php +++ b/system/Database/BaseConnection.php @@ -848,7 +848,7 @@ public function transBegin(bool $testMode = false): bool // Reset the transaction failure flag. // If the $test_mode flag is set to TRUE transactions will be rolled back // even if the queries produce a successful result. - $this->transFailure = ($testMode); + $this->transFailure = $testMode; if ($this->_transBegin()) { $this->transDepth++; diff --git a/system/Database/MySQLi/Connection.php b/system/Database/MySQLi/Connection.php index 6524d95b41f1..b1095003e286 100644 --- a/system/Database/MySQLi/Connection.php +++ b/system/Database/MySQLi/Connection.php @@ -96,7 +96,7 @@ public function connect(bool $persistent = false) $port = null; $socket = $this->hostname; } else { - $hostname = ($persistent) ? 'p:' . $this->hostname : $this->hostname; + $hostname = $persistent ? 'p:' . $this->hostname : $this->hostname; $port = empty($this->port) ? null : $this->port; $socket = ''; }