Hi,
On line 48 it is logical because if there is no ItemId, it will look for the first valid HikaShop item in order to have a correct url.
The call line 46 check if the given itemid is a valid one, if not valid it will enter in the second if (without the "!").
So I'm not sure I see the patch you proposed.
But I am sure that I will talk with Nicolas who submit the patch few days before the release without fully test it ; and now Nicolas is at the JWC so it's difficult to talk with him.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.