Compilation of Errors and Warnings
Notice: Undefined index
Section titled “Notice: Undefined index”Appearance :
Trying to access an array by a key that does not exist in the array
Possible Solution :
Check the availability before accessing it. Use:
Warning: Cannot modify header information - headers already sent
Section titled “Warning: Cannot modify header information - headers already sent”Appearance :
Happens when your script tries to send a HTTP header to the client but there already was output before, which resulted in headers to be already sent to the client.
Possible Causes :
<!DOCTYPE html><?php // Too late for headers already.<?php# There's a SINGLE space/newline before <? - Which already seals it.Reference from SO answer by Mario
Parse error: syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM
Section titled “Parse error: syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM”Appearance:
“Paamayim Nekudotayim” means “double colon” in Hebrew; thus this error refers to the inappropriate use of the double colon operator (::). The error is typically caused by an attempt to call a static method that is, in fact, not static.
Possible Solution:
$classname::doMethod();If the above code causes this error, you most likely need to simply change the way you call the method:
$classname->doMethod();The latter example assumes that $classname is an instance of a class, and the doMethod() is not a static method of that class.