[koha-commits] main Koha release repository branch master updated. v16.11.00-921-g2a2b973

Git repo owner gitmaster at git.koha-community.org
Fri Apr 28 12:49:21 CEST 2017


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 "main Koha release repository".

The branch, master has been updated
       via  2a2b9739117e74232c9a7abde516b1c436d4bad3 (commit)
       via  a1fcf1818c8d9f23d9c870e93c41c67a27faf603 (commit)
      from  21bddb399d7f88a33c6dff474d07190a09e627dc (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 2a2b9739117e74232c9a7abde516b1c436d4bad3
Author: Jonathan Druart <jonathan.druart at bugs.koha-community.org>
Date:   Tue Apr 18 13:50:36 2017 -0300

    Bug 18179: Update existing calls
    
    This patch updates the existing occurrences of ->find called in a list
    context.
    There are certainly others that are not easy to catch with git grep.
    Test plan:
    Confirm that the 4 modified scripts still works as expected.
    
    We need this one ASAP in master to make sure we will not get other
    side-effects of this kind and to catch possible uncaught occurrences
    before the release.
    
    Tested scripts changed by this patch, they work as expected.
    Signed-off-by: Marc Véron <veron at veron.ch>
    
    Signed-off-by: Nick Clemens <nick at bywatersolutions.com>
    
    Signed-off-by: Kyle M Hall <kyle at bywatersolutions.com>

commit a1fcf1818c8d9f23d9c870e93c41c67a27faf603
Author: Jonathan Druart <jonathan.druart at bugs.koha-community.org>
Date:   Tue Apr 18 13:49:18 2017 -0300

    Bug 18179: Forbid list context calls for Koha::Objects->find
    
    Reading https://perlmaven.com/how-to-return-undef-from-a-function
    this sound like the more correct behaviour.
    
    Considering:
    $template->param(
        stuff => Koha::Stuffs->find( $id ),
        foo   => 1,
    );
    without this patch, if the $id does not represent any rows in the DB,
    stuff will be assigned to 'foo' and $foo will be undef in the template.
    That can lead to very bad side-effects.
    
    With this patch we make sure that it will never happen again.
    
    Test plan:
      prove t/db_dependent/Koha/Objects.t
    should return green
    
    Signed-off-by: Marc Véron <veron at veron.ch>
    
    Signed-off-by: Nick Clemens <nick at bywatersolutions.com>
    
    Signed-off-by: Kyle M Hall <kyle at bywatersolutions.com>

-----------------------------------------------------------------------

Summary of changes:
 Koha/Objects.pm               |    2 ++
 members/memberentry.pl        |    2 +-
 members/moremember.pl         |    2 +-
 members/pay.pl                |    4 ++--
 opac/opac-user.pl             |    2 +-
 t/db_dependent/Koha/Objects.t |   12 +++++++++++-
 6 files changed, 18 insertions(+), 6 deletions(-)


hooks/post-receive
-- 
main Koha release repository


More information about the koha-commits mailing list