To reproduce: $ perl koha/misc/admin/koha-preferences get HASH(0x55dd4d432840) The problem is that _fetch_preference() fetches variable, value and type: 109 sub _fetch_preference { 110 my ( $preference ) = @_; 111 112 my $dbh = C4::Context->dbh; 113 114 my $row = $dbh->selectrow_hashref( " 115 SELECT 116 variable, value, type 117 FROM systempreferences 118 WHERE variable = ? 119 LIMIT 1 120 ", {}, $preference ); 121 122 exit 2 unless ( $row ); 123 124 return $row; 125 } And then all of that data is just printed, instead of only the value being printed.
Created attachment 138880 [details] [review] Bug 31325: Fix koha-preferences get To reproduce: $ perl koha/misc/admin/koha-preferences get MarcFlavour This will output something like "HASH(0x55dd4d432840)". To test: Apply this patch and run the command again: $ perl koha/misc/admin/koha-preferences get MarcFlavour This should output something like "MARC21".
Created attachment 138918 [details] [review] Bug 31325: Fix koha-preferences get To reproduce: $ perl koha/misc/admin/koha-preferences get MarcFlavour This will output something like "HASH(0x55dd4d432840)". To test: Apply this patch and run the command again: $ perl koha/misc/admin/koha-preferences get MarcFlavour This should output something like "MARC21". Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Created attachment 139050 [details] [review] Bug 31325: Fix koha-preferences get To reproduce: $ perl koha/misc/admin/koha-preferences get MarcFlavour This will output something like "HASH(0x55dd4d432840)". To test: Apply this patch and run the command again: $ perl koha/misc/admin/koha-preferences get MarcFlavour This should output something like "MARC21". Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Works as expected, Passing QA
Pushed to master for 22.11. Nice work everyone, thanks!
Backported to 22.05.x for 22.05.06
Not backported to oldoldstable (21.05.x). Feel free to ask if it's needed. Nothing to document it seems, marking resolved.
Thanks! Pushed to 21.11 for 21.11.12