Bug #80168 [NEW]: Warning on using second arg for imagexbm
| From: | matt dot peveler at gmail dot com | Date: | Thu, 01 Oct 2020 14:42:30 +0000 |
| Subject: | Bug #80168 [NEW]: Warning on using second arg for imagexbm | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-229308@lists.php.net to get a copy of this message | ||
From: matt dot peveler at gmail dot com
Operating system: Ubuntu 18.04
PHP version: 7.4.11
Package: GD related
Bug Type: Bug
Bug description:Warning on using second arg for imagexbm
Description:
------------
The documentation says that the second argument to imagexbm (like the
other functions) is optional, and that if not included, the output will
be sent to stdout instead of to a file. However, on running the test
script, I get a PHP Warning about the second argument missing and
nothing is outputted to stdout. Changing the used function to imagegif
(or any other variant) works as expected.
Test script:
---------------
<?php
// Create a blank image and add some text
$im = imagecreatetruecolor(120, 20);
$text_color = imagecolorallocate($im, 233, 14, 91);
imagestring($im, 1, 5, 5, 'A Simple Text String', $text_color);
// Output the image
imagexbm($im);
// Free up memory
imagedestroy($im);
Expected result:
----------------
Output the imagexbm binary to stdout
Actual result:
--------------
PHP Warning: imagexbm() expects at least 2 parameters, 1 given in
/tmp/test.php on line 9
--
Edit bug report at https://bugs.php.net/bug.php?id=80168&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=80168&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=80168&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=80168&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=80168&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=80168&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=80168&r=support
Expected behavior: https://bugs.php.net/fix.php?id=80168&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=80168&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=80168&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=80168&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=80168&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=80168&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=80168&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=80168&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=80168&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=80168&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=80168&r=mysqlcfg