Fix php error. closes #2684