DragonByte Tech
Well-known member
- Affected version
- 2.0.9
This block:
triggers a warning in phpStorm because the
This looks like the sort of thing that would be tightened in a future version of PHP as they slowly move towards getting rid of bad practices from the early days of PHP, so given that people need to pass
Fillip
PHP:
public function alertFromUser(
\XF\Entity\User $receiver, \XF\Entity\User $sender = null,
$contentType, $contentId, $action, array $extra = []
)
$sender
variable is optional, but then followed by a required $contentType
variable.This looks like the sort of thing that would be tightened in a future version of PHP as they slowly move towards getting rid of bad practices from the early days of PHP, so given that people need to pass
null
to it anyway, we might as well drop the "optionality" of that argument Fillip