Skip to content

Empty comment field in album preventing export from external application #86

Description

@Icephale

With versions:

  • Piwigo: 14.3.0
  • community plugin: 14.a
  • php: 8.2.18

strip_tags refuses null parameter and prevent fetching albums informations (tested with digikam exporter and albums with no comment).

PHP message: PHP Deprecated: strip_tags(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/piwigo/plugins/community/main.inc.php on line 586
Temporarily resolved with a condition:

    if ($row['comment'])
    {
    $row['comment'] = strip_tags(
      trigger_change(
        'render_category_description',
        $row['comment'],
        'ws_categories_getList'
        )
    );
    }
    else
    {
    $row['comment'] = strip_tags(
      trigger_change(
        'render_category_description',
        '',
        'ws_categories_getList'
        )
    );
    }

$row['comment'] = strip_tags(

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions