Skip to content

Commit 0f6752c

Browse files
committed
v1.1.2
* Use `Collection::put()` instead of `Collection::replace()` to maintain backwards compatibility.
1 parent 08624f7 commit 0f6752c

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## v1.1.2 (08-07-2019)
2+
3+
### Bug fixes
4+
- Use `Collection::put()` instead of `Collection::replace()` to maintain backwards compatibility.
5+
16
## v1.1.1 (08-07-2019)
27

38
### Enhancements

src/Directives/WordPress.php

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -290,21 +290,15 @@
290290
! is_numeric($image) &&
291291
$image = Util::field($image)
292292
) {
293-
$expression = $expression->replace([
294-
0 => is_array($image) && ! empty($image['id']) ? $image['id'] : $image
295-
]);
293+
$expression = $expression->put(0, is_array($image) && ! empty($image['id']) ? $image['id'] : $image);
296294
}
297295

298296
if (! empty($expression->get(3))) {
299-
$expression = $expression->replace([
300-
2 => Util::clean($expression->slice(2)->all())
301-
]);
297+
$expression = $expression->put(2, Util::clean($expression->slice(2)->all()));
302298
}
303299

304300
if (! empty($expression->get(2)) && ! Util::isArray($expression->get(2))) {
305-
$expression = $expression->replace([
306-
2 => Util::toString(['alt' => $expression->get(2)])
307-
]);
301+
$expression = $expression->put(2, Util::toString(['alt' => $expression->get(2)]));
308302
}
309303

310304
if ($expression->get(1)) {

0 commit comments

Comments
 (0)