[Koha-bugs] [Bug 10900] Incorrect calling conventions accessing C4::Context

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Oct 17 22:05:50 CEST 2013


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10900

M. Tompsett <mtompset at hotmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #22037|0                           |1
        is obsolete|                            |

--- Comment #17 from M. Tompsett <mtompset at hotmail.com> ---
Created attachment 22038
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=22038&action=edit
Bug 10900 - Incorrect calling conventions accessing C4::Context

There were multiple calling conventions for C4::Context's
set_userenv routine. So the following commands were used to
find discrepancies:
    grep "::set_userenv" `find .`
    grep "\->set_userenv" `find .`

The first grep demonstrated that the smaller change is from
:: to -> as only C4/Auth.pm, installer/InstallAuth.pm, and
t/db_dependent/Circulation.t would need to be modified. This
patch corrects C4::Context's set_userenv routine to be object
call based (use ->) by using a shift to ignore the first
parameter, and modify the three files found with :: calls.

As the result of trying to roll a distribution,
t/Circulation_barcodedecode.t was discovered to be faulty. The
cause being incorrect parameters! This was hidden when there
was no shift in the set_userenv routine. However, with its
correction, the test broke.

This led me to read the POD documentation for the function
set_userenv in C4::Context and realize it was outdated as
well. It has been revised to match the current version of
the function.

Then intentionally bad parameters passed to the set_userenv
routine in C4::Context were hunted down. The biggest problems
were missing surnames or branch names.

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


More information about the Koha-bugs mailing list