This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
reset.t: Basic tests for resetting aggregates
[perl5.git] / pp_ctl.c
index 1998816..f8190e3 100644 (file)
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -5443,6 +5443,7 @@ S_run_user_filter(pTHX_ int idx, SV *buf_sv, int maxlen)
 
        if (count > 0) {
            SV *out = POPs;
+           SvGETMAGIC(out);
            if (SvOK(out)) {
                status = SvIV(out);
            }
@@ -5512,7 +5513,7 @@ S_run_user_filter(pTHX_ int idx, SV *buf_sv, int maxlen)
        concatenate it then we get a warning about use of uninitialised value.
     */
     if (!err && upstream != buf_sv &&
-        (SvOK(upstream) || SvGMAGICAL(upstream))) {
+        SvOK(upstream)) {
        sv_catsv_nomg(buf_sv, upstream);
     }
     else if (SvOK(upstream)) (void)SvPV_force_nolen(buf_sv);