BP has been warned by the UK offshore safety regulator after workers were placed "in harm's way" when they had