As designed Wrong parameter type for findChangeLogsByContent and findChangeLogsByContentType in \XF\Repository\ChangeLog

DragonByte Tech

Well-known member
Affected version
2.2.0b4
In \XF\Repository\ChangeLog, findChangeLogsByContent and findChangeLogsByContentType have string as their argument type in the php docblock, but string[] is also a valid value. This causes phpStorm to complain about argument not being compatible with declaration when called with an array.

The fix would be to change these two instances to string|string[].
 
I believe you reported something like this before, but while both declarations may work due to an internal implementation detail, these were implemented such that they expect single values for these arguments.

If you have an instance where you need to pass multiple values in, we'd recommend creating a method specific for that use case.
 
Back
Top Bottom