I was a bit hasty in my previous reply. Yes, it goes in function embed_static but not just anywhere.
The check code should go before the calls to proc_open and system. Otherwise the check would be too late to prevent the error message.
So I guess it should go near the top of function embed_static.
Cheers,
Dennis
It should be added to function embed_static (anywhere in that function prior to the last return).
Cheers,
Dennis