https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40663

Alla Santosh Pavan Kumar <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #10 from Alla Santosh Pavan Kumar <[email protected]> ---
Comment on attachment 186138
  --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=186138
Bug 40663: Revert "Bug 40490: Remove warnings from GD::Barcode::QRcode - U24"

Based on the Git diff you provided, here's a summary of the changes and what
they do.

### Summary

The commit `fd6ceb6b244bf65d8cf0c1144a9a903490fdaadf` introduced a bug related
to QR barcodes, and the provided patch **reverts** those changes.

This specific change removes a block of code that was added to a Perl test
file, `t/db_dependent/api/v1/two_factor_auth.t`. This code was a workaround for
a known bug in the `GD::Barcode::QRcode` module. The bug caused a specific
warning to be thrown during the QR code generation process.

### Breakdown of the Changes

The diff shows that two identical blocks of code were removed from the test
file. Each block did the following:

* `local $SIG{__WARN__} = sub { };`: This line temporarily overrides the
default warning handler in Perl. It sets the handler to an empty subroutine,
which effectively **silences all warnings** for the duration of the code block.
* `my $dup_err; local *STDERR; open STDERR, ">>", \$dup_err;`: This redirects
the standard error output (`STDERR`) to a local variable named `$dup_err`.
* `$t->request_ok($tx)->status_is(201);`: This line is the actual test
assertion. It sends a request to the API and checks if the response is
successful (`HTTP 201 Created`).
* `close STDERR;`: This closes the redirected standard error output, restoring
it to the default.

By reverting these changes, the code is restored to its original state, which
simply performs the API request and asserts the status code without trying to
handle or suppress the warning.

In essence, the reversion removes a temporary fix that was likely causing more
problems or was no longer necessary, possibly due to a fix in the underlying
`GD::Barcode` module itself.

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to