fixes PHP date() syntax notice
Minor
fixes PHP notice for undefined $action variable