fix undefined variable and correct key in purger.php