Fixing PHP warnings.
Fixing PHP warnings, format code.