[Koha-bugs] [Bug 10382] collection not returning to null when removed from course reserves

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Sep 24 16:36:10 CEST 2018


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

--- Comment #56 from Alex Arnaud <alex.arnaud at biblibre.com> ---
(In reply to Marcel de Rooy from comment #55)
> (In reply to Alex Arnaud from comment #54)
> > If you put this at the line #113, this is just after the ccode test. So why
> > would it change anything ?
> It should be after that test. But its purpose is to check what happens later
> when you revert the course reserve and put back the original value..
> 
> > Also, $item->ccode(undef)->store; and $item->ccode('')->store; is different.
> > Undef is not converted to null:
> Yes it is. Your example below is the proof ! NULL vs empty string
> 
> > $item->ccode(undef)->store;
> > MariaDB [koha]> select ccode from items where itemnumber = xxxx;
> > +-------+
> > | ccode |
> > +-------+
> > | NULL  |
> > +-------+
> > 1 row in set (0.00 sec)
> > 
> > $item->ccode('')->store;
> > MariaDB [koha]> select ccode from items where itemnumber = xxxx;
> > +-------+
> > | ccode |
> > +-------+
> > |       |
> > +-------+
> > 1 row in set (0.00 sec)
> > 
> > But i think it is transparent for us when using dbic methods. Returned
> > values are the same.
> They are not the same.

Right.
And this it's managed afaik. Change '' by undef at line #109: You'll have do to
do the same thing at #line #112 to make the test pass and vice versa.

But i don't understand why puting your code at line #113 should be a problem if
the test still pass.

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


More information about the Koha-bugs mailing list