Hi @pandalive,
You can solve this problem by setting a default value to $logged_user_id as 0x0 so that it is not empty.
0x0