Update legacy.php

need to check that there is a value in config. doh.