File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed
Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file.
44The format is based on [ Keep a Changelog] ( http://keepachangelog.com/en/1.0.0/ )
55and this project adheres to [ Semantic Versioning] ( http://semver.org/spec/v2.0.0.html ) .
66
7+ [ unreleased]
8+
9+ [ php-81-automatic-conversion-hotfix]
10+ ### Fixed
11+ - Fixes "Automatic conversion of false to array is deprecated" on Dust.php
12+
13+ [ released]
714## [ 1.38.1]
815
916### Fixed
Original file line number Diff line number Diff line change @@ -73,6 +73,12 @@ public function __construct( string $template ) {
7373 public function render ( array $ fields ) : string {
7474 $ compiled = self ::$ dust ->compileFile ( $ this ->template );
7575
76+ // In same cases this might be false.
77+ // We need to set key as an array after PHP 8.1 in these situations.
78+ if ( empty ( $ fields ['data ' ] ) ) {
79+ $ fields ['data ' ] = [];
80+ }
81+
7682 // Pass on the block data
7783 $ fields ['data ' ]['block ' ] = $ fields ['block ' ];
7884
You can’t perform that action at this time.
0 commit comments