Fix php error in error_api