They should be called with an instance of the class, not directly as class methods: Koha::Object->new->empty vs Koha::Object->empty A trick has been done earlier to accept the second form, but as we notice the same need/problem for another method it seems better to enforce a rule and forbid such calls. An exception will be raised if the methods are called without an instantiated object. See also commit 4805b9b9dd0a95d79faf450ed1aaaec62d544ec6 Bug 25296: Make ->empty work for uninstantiated calls
Created attachment 104587 [details] [review] Bug 25423: Add Koha::Exceptions::Object::NotInstantiated Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 104588 [details] [review] Bug 25423: Unit tests Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 104589 [details] [review] Bug 25423: Add Koha::Exceptions::Object::NotInstantiated Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 104590 [details] [review] Bug 25423: Unit tests Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 104591 [details] [review] Bug 25423: (follow-up) Unit tests
Created attachment 104592 [details] [review] Bug 25423: Force call to update and empty with an instanciated object
Created attachment 104593 [details] [review] Bug 25423: Add Koha::Exceptions::Object::NotInstantiated Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 104594 [details] [review] Bug 25423: Unit tests Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 104595 [details] [review] Bug 25423: (follow-up) Unit tests Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 104596 [details] [review] Bug 25423: Force call to update and empty with an instanciated object Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Taking on Martin to push this one for 20.05
Created attachment 104618 [details] [review] Bug 25423: (follow-up) Fix wrong test This is confusing: why does it pass on all OSs but Debian 8? Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
not backported to 19.11.x