Solving php warnings