diff options
| author | Mike-Benoit <mikeb@timetrex.com> | 2023-04-12 08:58:57 -0700 |
|---|---|---|
| committer | Damien Regad <dregad@mantisbt.org> | 2023-04-15 15:06:40 +0200 |
| commit | ef3d226de1a5008bef53218ee9aeaaff85fcf7a6 (patch) | |
| tree | f13b00a07f9a8c3fb114e1e36b67c9bafe0defaa /adodb-loadbalancer.inc.php | |
| parent | f5f873c6b7bc3e648e42f99b09d28c5191ac0c98 (diff) | |
| download | adodb-ef3d226de1a5008bef53218ee9aeaaff85fcf7a6.tar.gz adodb-ef3d226de1a5008bef53218ee9aeaaff85fcf7a6.tar.bz2 adodb-ef3d226de1a5008bef53218ee9aeaaff85fcf7a6.zip | |
Minor fixes to load balancer for PHP 8.2+ warnings
Fixes #951
Signed-off-by: Damien Regad <dregad@mantisbt.org>
Updated Changelog and added PR reference in commit message, back-ported
to hotfix/5.22 branch.
Diffstat (limited to 'adodb-loadbalancer.inc.php')
| -rw-r--r-- | adodb-loadbalancer.inc.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/adodb-loadbalancer.inc.php b/adodb-loadbalancer.inc.php index 88f5d0fd..de067805 100644 --- a/adodb-loadbalancer.inc.php +++ b/adodb-loadbalancer.inc.php @@ -38,17 +38,17 @@ class ADOdbLoadBalancer /** * @var bool|array All connections to each database. */ - protected $connections = false; + protected $connections = []; /** * @var bool|array Just connections to the write capable database. */ - protected $connections_write = false; + protected $connections_write = []; /** * @var bool|array Just connections to the readonly database. */ - protected $connections_readonly = false; + protected $connections_readonly = []; /** * @var array Counts of all connections and their types. @@ -73,12 +73,12 @@ class ADOdbLoadBalancer /** * @var bool Session variables that must be maintained across all connections, ie: SET TIME ZONE. */ - protected $session_variables = false; + protected $session_variables = []; /** * @var bool Called immediately after connecting to any DB. */ - protected $user_defined_session_init_sql = false; + protected $user_defined_session_init_sql = []; /** @@ -403,7 +403,7 @@ class ADOdbLoadBalancer */ private function executeSessionVariables($adodb_obj = false) { - if (is_array($this->session_variables)) { + if (is_array($this->session_variables) && count($this->session_variables) > 0) { $sql = ''; foreach ($this->session_variables as $name => $value) { // $sql .= 'SET SESSION '. $name .' '. $value; |
