Fixed undefined php variable