Added custom error if error_get_last() does not return anything.