[Bps-public-commit] dbix-searchbuilder branch master updated. 1.75-1-g4689e7f
BPS Git Server
git at git.bestpractical.com
Thu Apr 20 13:39:21 UTC 2023
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "dbix-searchbuilder".
The branch, master has been updated
via 4689e7f6399c9ad1fb5b4df8b1d79368d795c8ed (commit)
from a7e31a326875076dcc0da2ad19ebd208a89d58c2 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 4689e7f6399c9ad1fb5b4df8b1d79368d795c8ed
Author: sunnavy <sunnavy at bestpractical.com>
Date: Thu Apr 20 21:30:14 2023 +0800
Call DatabaseVersion instead to make sure we already retrieved the version
This is to avoid a possible uninitialized warning when
{database_version} is not set yet on disconnect.
The extra "// ''" is just in case.
diff --git a/lib/DBIx/SearchBuilder/Handle.pm b/lib/DBIx/SearchBuilder/Handle.pm
index 2ad7907..eb8c7a7 100755
--- a/lib/DBIx/SearchBuilder/Handle.pm
+++ b/lib/DBIx/SearchBuilder/Handle.pm
@@ -333,7 +333,7 @@ sub Disconnect {
# interacting with a disconnected handle, here we unset
# dbh to inform other code that there is no connection any more.
# See also https://github.com/perl5-dbi/DBD-mysql/issues/306
- my ($version) = $self->{'database_version'} =~ /^(\d+\.\d+)/;
+ my ($version) = ( $self->DatabaseVersion // '' ) =~ /^(\d+\.\d+)/;
if ( $self->isa('DBIx::SearchBuilder::Handle::mysql')
&& $self->{'database_version'} =~ /mariadb/i
&& version->parse('v'.$version) > version->parse('v10.2') )
-----------------------------------------------------------------------
Summary of changes:
lib/DBIx/SearchBuilder/Handle.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
hooks/post-receive
--
dbix-searchbuilder
More information about the Bps-public-commit
mailing list