# [PATCH] fix Warning in image2wbmp

- Thread: https://externals.io/message/8045
- Original archive: https://news-web.php.net/php.internals/8045
- Started by Nuno Lopes on 2004-02-22T11:12:02+00:00
- Messages: 3
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #8045 — Nuno Lopes — 2004-02-22T11:12:02+00:00

URL: https://externals.io/message/8045#8045

Hello,

Here is a small patch to fix a warning in image2wbmp() when you call that
function without the optional parameters.


Nuno


-------------------------
reproduce script:
<?
$image = imagecreatefrompng('php.png');
image2wbmp($image);
?

---

## #8052 — Ilia Alshanetsky — 2004-02-22T17:19:32+00:00

URL: https://externals.io/message/8045#8052 · In reply to: #8045

This is already addressed in CVS.

Ilia


> Hello,
>
> Here is a small patch to fix a warning in image2wbmp() when you call that
> function without the optional parameters.
>
>
> Nuno
>
>
> -------------------------
> reproduce script:
> <?
> $image = imagecreatefrompng('php.png');
> image2wbmp($image);
> ?

---

## #8053 — Nuno Lopes — 2004-02-22T17:46:25+00:00

URL: https://externals.io/message/8045#8053 · In reply to: #8052

Sorry Ilia, but it isn't. Your change only sets the parameter to 0 when you
specify an invalid threshold.
When you don't specify the threshold, it will throw a warning because the
default is -1 (invalid).

Nuno


> This is already addressed in CVS.
>
> Ilia
>
> 
> > […]
that
> > […]
