Skip to content

Allow image from url without extension #2458

@JokubasR

Description

@JokubasR

Describe the Bug

"Undefined array key 1" error occurs If image url used in html is without an extension.

Steps to Reproduce

Please provide a code sample that reproduces the issue.

<p>
    <img src="http://placekitten.com/200/300" width="150" height="200" style="float: right;"/>
</p>

Expected Behavior

Image should be downloaded and used in document

Current Behavior

Error is thrown "Undefined array key 1" in \PhpOffice\PhpWord\Shared\Html::parseImage:968

Context

Please fill in your environment information:

  • PHP Version: 8.2
  • PHPWord Version: 1.1.0

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions