Please provide a short description of what you have encountered below.
During a slice to dictionary conversion, the integer key is not properly converted into string type causing a crash when the API is used. This is found in List Data Sanitizer API.
Expected Behavior
Please specify the expected behavior of your usage below.
This patch is applied:
--- a/sites/themes/hestiaHUGO/layouts/partials/Hestia/functions/data/list/Init
+++ b/sites/themes/hestiaHUGO/layouts/partials/Hestia/functions/data/list/Init
@@ -41,7 +41,7 @@ specific language governing permissions and limitations under the License.
{{- if partial "Hestia/functions/data/list/IsSlice" $ret -}}
{{- $dataList = dict -}}
{{- range $i, $v := $ret -}}
- {{- $dataList = merge $dataList (dict $i $v) -}}
+ {{- $dataList = merge $dataList (dict (string $i) $v) -}}
{{- end -}}
{{- else if partial "Hestia/functions/data/list/IsMap" $ret -}}
{{- $dataList = $ret -}}
Current Behavior
Please specify the current behavior of software below.
Crashes if slice is given and the sanitizer attempts to convert it to dictionary.
Steps to Reproduce (COMPULSORY)
Please specify all the steps required to re-produce the problem.
Attachments
Please drag and drop the necessary data files (e.g. screenshot, logs, etc)
below.
Description
During a slice to dictionary conversion, the integer key is not properly converted into string type causing a crash when the API is used. This is found in List Data Sanitizer API.
Expected Behavior
This patch is applied:
Current Behavior
Crashes if slice is given and the sanitizer attempts to convert it to dictionary.
Steps to Reproduce (COMPULSORY)
Attachments