Skip to content

NullArgument

null is passed to a parameter that does not accept null.

<?php
function send(string $to): void {}
send(null); // string does not accept null

Pass a non-null value or widen the parameter type to ?string.