fix empty function error in php < v5.5