Doc #68239 [NEW]: Incorrect documentation or library bug
| From: | richard at sublogic dot se | Date: | Wed, 15 Oct 2014 18:14:57 +0000 |
| Subject: | Doc #68239 [NEW]: Incorrect documentation or library bug | ||
| Groups: | php.doc.bugs | ||
| Request: | Send a blank email to doc-bugs+get-11552@lists.php.net to get a copy of this message | ||
From: richard at sublogic dot se
Operating system: Archlinux
PHP version: 5.6.1
Package: GD related
Bug Type: Documentation Problem
Bug description:Incorrect documentation or library bug
Description:
------------
---
From manual page: http://www.php.net/function.imagescale
---
The function imagescale either has an implementation bug floating around
or the documentation is wrong.
The issue is with the $height parameter. The docs say it can optionally
be provided but the reality is the following error:
Warning: imagescale(): gd warning: one parameter to a memory allocation
multiplication is negative or zero, failing operation gracefully ...
Link: https://bugs.php.net/bug.php?id=65171
The only way for imagescale() to function properly at present is to
explicitly provide a value for $height.
It would be very helpful if the docs gave a warning on this issue.
Test script:
---------------
$imageres = imagecreatetruecolor(600, 500);
$imageres = imagescale($imageres, 380, 380);
imagejpeg($imageres, $dstdir . $filename);
imagedestroy($imageres);
--
Edit bug report at https://bugs.php.net/bug.php?id=68239&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=68239&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=68239&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=68239&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=68239&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=68239&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=68239&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=68239&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=68239&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=68239&r=support
Expected behavior: https://bugs.php.net/fix.php?id=68239&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=68239&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=68239&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=68239&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=68239&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=68239&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=68239&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=68239&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=68239&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=68239&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=68239&r=mysqlcfg