FIx php errors. closes #2297