Suppressing PHP warning and fixing notice