Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow image from url without extension #2458

Closed
JokubasR opened this issue Sep 3, 2023 · 0 comments · Fixed by #2459
Closed

Allow image from url without extension #2458

JokubasR opened this issue Sep 3, 2023 · 0 comments · Fixed by #2459
Milestone

Comments

@JokubasR
Copy link
Contributor

JokubasR commented Sep 3, 2023

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:https://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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

2 participants