Stringfilter with ArrayValue leads to Warning: addcslashes() expects parameter 1 to be string, array given

Created on 13 April 2023, over 1 year ago
Updated 14 June 2023, over 1 year ago

Problem/Motivation

Stringfilter Value is configured as array but should be String.

Steps to reproduce

Update an existing Site to php 8.1

Proposed resolution

Keep value = "StringValue" instead of value = [0 => 'Stringvalue', type = "String"]

Remaining tasks

Pagedesigner Elements should be stored in the correct format and not only be fixed in a workaround once retrieved during rendering.

User interface changes

-

API changes

-

Data model changes

Perhpas Pagedesigner Elements have to be fixed.

🐛 Bug report
Status

Fixed

Version

2.2

Component

Code

Created by

🇩🇪Germany zuernbernhard

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @zuernbernhard
  • @zuernbernhard opened merge request.
  • First commit to issue fork.
  • 🇨🇭Switzerland pvbergen

    @zuernBernhard
    Thanks for providing a workaround for making adaptable block php8.1 compatible. I've added an additional check on the type of the $item['value'] as without this it may break in cases, where $item['value'] already is a string.

    In general, I agree that we need to cleanup values in the element's storage to fix these issues at the root. I will try to provide an update hook soon.

  • 🇩🇪Germany zuernbernhard

    Thank you - I think we will deploy this today.

  • Status changed to Fixed over 1 year ago
  • Status changed to Fixed over 1 year ago
Production build 0.71.5 2024