## What this teaches

How to errorException Only variables should be passed by reference.

## The problem

Issue xendit/xendit-php#226 (closed, 7 comments): #ask hi sori mau nanya perihal xendit code from : projectname/vendor/xendit/xendit-php/lib/Invoice/InvoiceApi.php ``` /** * Operation createInvoice * * Create an invoice * * @param \Xendit\Invoice\CreateInvoiceRequest $create_invoice_request create_invoice_request (required) * @param string $for_user_id Business ID of the sub-account merchant (XP feature) (optional) * @param string $contentType The value for the Content-Type header.

## What worked (verified answer)

If xendit-php throws 'Only variables should be passed by reference' when creating an invoice, upgrade the SDK to v7.0 or later. Users on v5.0 confirmed the error disappeared after upgrading. Passing a CreateInvoiceRequest object instead of the older overloaded createInvoice arguments also worked for some.

## Source

gh:xendit/xendit-php#226 - https://github.com/xendit/xendit-php/issues/226
