php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #38390 imagecopyresized's return value not documented
Submitted: 2006-08-08 23:20 UTC Modified: 2006-08-17 01:00 UTC
Votes:1
Avg. Score:2.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: bigmrpoo at yahoo dot com Assigned:
Status: No Feedback Package: Documentation problem
PHP Version: Irrelevant OS: WinXP
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2006-08-08 23:20 UTC] bigmrpoo at yahoo dot com
Description:
------------
The documentation page for imagecopyresized does not describe the return value other than stating it is a boolean value.

If this is an indicator of success or failure of the operation, then clients of this function must be programmed to behave correctly in case of failure. To do this, we must also know what situations will cause it to fail, and what side effects (if it is not atomic) occur if the operation fails.


I tried to point out the clients of this function need to be aware of these issues in the comments for that page, but one of the editors decided to take my points as a question, not as raising a "gotcha" for the users of the function... So now im posting it here.

Reproduce code:
---------------
http://au2.php.net/manual/en/function.imagecopyresized.php


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-08-09 10:26 UTC] pajoye@php.net
It returns true on success and false on error. That's why the return value is defined as bool.

The only case where it failed is when you try to pass zero (or negative) width/height.

And finally, which issues are you talking about?
 [2006-08-17 01:00 UTC] phpdoc at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Sun Nov 17 15:01:41 2019 UTC