fixing empty bug in early versions of php