The law would have required civil society groups and the media to register as being “under foreign influence” if they receive funding from abroad.