Aslında bu bir hata değil, uyarıdır. Sayfa başına şu kodu koyarsan bu uyarıyı giderebilirsin.

error_reporting( E_ALL ^ E_NOTICE);