php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #71762 Gmagick::destroy() returns bool, not Gmagick
Submitted: 2016-03-10 00:22 UTC Modified: 2016-03-15 17:10 UTC
From: benjamin dot morel at gmail dot com Assigned: cmb (profile)
Status: Closed Package: gmagick (PECL)
PHP Version: Irrelevant OS: N/A
Private report: No CVE-ID: None
 [2016-03-10 00:22 UTC] benjamin dot morel at gmail dot com
Description:
------------
http://php.net/manual/en/gmagick.destroy.php

Source:
https://github.com/vitoc/gmagick/blob/master/gmagick_methods.c#L748

Equivalent in Imagick:
http://php.net/manual/en/imagick.destroy.php

Expected result:
----------------
public bool Gmagick::destroy ( void )

Actual result:
--------------
public Gmagick Gmagick::destroy ( void )

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-03-10 17:50 UTC] cmb@php.net
-Package: Documentation problem +Package: gmagick
 [2016-03-10 18:00 UTC] 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 18:06 UTC] 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-13 11:30 UTC] 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-15 16:36 UTC] 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-15 17:10 UTC] cmb@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: cmb
 [2016-03-15 17:10 UTC] cmb@php.net
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.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 01:01:30 2024 UTC