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

Created on 13 April 2023, about 1 year ago
Updated 14 June 2023, about 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 about 1 year ago
  • πŸ‡¨πŸ‡­Switzerland pvbergen
  • Status changed to Fixed about 1 year ago
  • πŸ‡¨πŸ‡­Switzerland pvbergen
Production build 0.69.0 2024