Doc #71762 [Opn->Csd]: Gmagick::destroy() returns bool, not Gmagick
| From: | cmb@php.net | Date: | Tue, 15 Mar 2016 17:10:54 +0000 |
| Subject: | Doc #71762 [Opn->Csd]: Gmagick::destroy() returns bool, not Gmagick | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-13328@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=71762&edit=1
ID: 71762
Updated by: cmb@php.net
Reported by: benjamin dot morel at gmail dot com
Summary: Gmagick::destroy() returns bool, not Gmagick
-Status: Open
+Status: Closed
Type: Documentation Problem
Package: gmagick
Operating System: N/A
PHP Version: Irrelevant
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.
Thank you for the report, and for helping us make our documentation better.
Previous Comments:
------------------------------------------------------------------------
[2016-03-15 16:36:28] cmb@php.net
Automatic comment from SVN on behalf of cmb
Revision: http://svn.php.net/viewvc/?view=revision&revision=338751
Log: fixd #71762 (Gmagick::destroy() returns bool, not Gmagick)
------------------------------------------------------------------------
[2016-03-13 11:30:37] benjamin dot morel at gmail dot com
The issue has been fixed on GitHub, destroy() can only return bool now:
https://github.com/vitoc/gmagick/commit/d7dc731608c32147b10d8f1f8a80eabb71577b13
So the doc should reflect this:
public bool Gmagick::destroy ( void )
------------------------------------------------------------------------
[2016-03-10 18:06:32] benjamin dot morel at gmail dot com
I just opened a bug on GitHub, I suggest we wait for the feedback of the extension author before we
update the doc!
https://github.com/vitoc/gmagick/issues/39
------------------------------------------------------------------------
[2016-03-10 18:00:59] benjamin dot morel at gmail dot com
Indeed, then when should document it as returning Gmagick|bool, I guess.
I just tested however, and can't get it to return false, even when destroying it multiple
times:
$g = new Gmagick();
echo get_class($g->destroy()); // Gmagick
echo get_class($g->destroy()); // Gmagick
------------------------------------------------------------------------
[2016-03-10 17:50:57] cmb@php.net
It appears the proto in the sources is wrong. ::destroy() either
returns FALSE or itself, see
<https://github.com/vitoc/gmagick/blob/master/gmagick_methods.c#L762>
<https://github.com/vitoc/gmagick/blob/master/gmagick_methods.c#L769>
<https://github.com/vitoc/gmagick/blob/master/php_gmagick_macros.h#L24>
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=71762
--
Edit this bug report at https://bugs.php.net/bug.php?id=71762&edit=1