[Koha-bugs] [Bug 23166] Simplify code related to orders in catalogue/*detail.pl

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Aug 24 18:28:47 CEST 2020


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

--- Comment #38 from Joonas Kylmälä <joonas.kylmala at helsinki.fi> ---
There seems to be nothing wrong with the code, it is just that the QA tool
doesn't add the "orders" object because this is not being executed from the
real .pl script, so therefore the $set variable is undef. I think we could say
this is false positive then, right? Or if we want to prevent the QA tool
failing maybe such a check can be added:

  sub Scalar {
      my ( $self, $set, $method ) = @_;
+     return undef unless $set;
      $set = $set->$method;
      return $set;
  }

What do you think? I think it is safe to ignore this here and we could go ahead
with the current patches.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list