CRM_Core_Resources::addBundle() - Fix handling of array inputs
authorTim Otten <totten@civicrm.org>
Fri, 18 Sep 2020 00:26:38 +0000 (17:26 -0700)
committerTim Otten <totten@civicrm.org>
Fri, 18 Sep 2020 00:26:38 +0000 (17:26 -0700)
commit87edc8d2ab0de60dcd21d893583d6e0aabf8eeb7
treef43594454612154748c36ca20511b7f309ce506e
parenta5e7d9d2135cf130222a74902050aba5efe2afd2
CRM_Core_Resources::addBundle() - Fix handling of array inputs

(This fixes a small bug in a new function added during this release -- part of #18247.)

The signature of `addBundle()` optionally accepts an array/iterable -- if
given, then it should add all the items from the array. For example:

```php
Civi::resources()->addBundle(['foo', 'bar']);
```

Before
------

It adds `foo` but then bails out on `bar`.

After
-----

It adds both `foo` and `bar`.
CRM/Core/Resources.php
CRM/Core/Resources/CollectionTrait.php