fix strict standards warning
fix depretiated function warning