Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CRM_Core_Resources::addBundle() - Fix handling of array inputs #18506

Merged
merged 1 commit into from
Sep 18, 2020

Conversation

totten
Copy link
Member

@totten totten commented Sep 18, 2020

Overview

This fixes a small bug in a new function added during this version-cycle -- 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:

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

Before

It adds foo but ignores bar and whiz.

After

It adds foo, bar, and whiz.

(This fixes a small bug in a new function added during this release -- part of civicrm#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`.
@civibot
Copy link

civibot bot commented Sep 18, 2020

(Standard links)

@seamuslee001
Copy link
Contributor

Test fails unrelated

@seamuslee001 seamuslee001 merged commit fa90126 into civicrm:master Sep 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants