Skip to content

Update for setImageValue() inside clonedBlock with indexed values #1624

@Amerlander

Description

@Amerlander

This is:

  • a bug report

Expected Behavior

The cloned imagefield ${IMAGE:10cmx15cm} should return like ${IMAGE#1:10cmx15cm}

Current Behavior

Its returned like ${IMAGE:10cmx15cm#1}

Failure Information

I changed the RegularExpression in indexClonedVariables() for fixing this behaviour. It works for my purpose, but I didnt checked further:
$results[] = preg_replace('/\$\{(.*?)(:([^}])*)?\}/', '\${\\1#' . $i . '\\2}', $xmlBlock);

6a51165

Context

  • PHP version:
  • PHPWord version: 0.16.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions