Bug 35263: (QA follow-up) Update code
authorPedro Amorim <pedro.amorim@ptfs-europe.com>
Tue, 7 Nov 2023 10:25:18 +0000 (10:25 +0000)
committerTomas Cohen Arazi <tomascohen@theke.io>
Wed, 8 Nov 2023 12:58:53 +0000 (09:58 -0300)
commita61c344e332dede8165a457cd66f0ea0d49bc09c
treeb2374edd4f7415387cbe95dd5d86f06994585df8
parentbac896bb65b97cec1311f68b35c79f56f429f189
Bug 35263: (QA follow-up) Update code

Thank you Jonathan. I first tried with '||' but it would fallback to 1
for either undef or 0 (we want the first case, but not the second).
But using '//' instead, it only falls back to 1 if undef, and not when 0.
Today I learned between '||' and '//'! Thanks!

From perldoc.perl.org (relating to '//'):
'In fact, it's exactly the same as ||, except that it tests the left hand
side's definedness instead of its truth.'

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
admin/categories.pl