Doc #68239 [Com]: Incorrect documentation or library bug

From: Date: Wed, 05 Nov 2014 15:13:10 +0000
Subject: Doc #68239 [Com]: Incorrect documentation or library bug
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-11604@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=68239&edit=1

 ID:                 68239
 Comment by:         remi@php.net
 Reported by:        richard at sublogic dot se
 Summary:            Incorrect documentation or library bug
 Status:             Verified
 Type:               Documentation Problem
 Package:            GD related
 Operating System:   Archlinux
 PHP Version:        5.6.1
 Assigned To:        pajoye
 Block user comment: N
 Private report:     N

 New Comment:

FYI the bug #65171 is fix in upcoming 5.5.19 / 5.6.3


Previous Comments:
------------------------------------------------------------------------
[2014-10-17 13:44:20] tyrael@php.net

I think we should either fix the arginfo and the docs to make the height mandatory, or it should
work when the argument is omitted.

------------------------------------------------------------------------
[2014-10-15 18:14:56] richard at sublogic dot se

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 this bug report at https://bugs.php.net/bug.php?id=68239&edit=1


Thread (4 messages)

« previous php.doc.bugs (#11604) next »