|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #60829 getColor don't accept second option
Submitted: 2012-01-21 06:53 UTC Modified: 2012-06-02 05:53 UTC
From: fedora at famillecollet dot com Assigned: mkoppanen (profile)
Status: Closed Package: gmagick (PECL)
PHP Version: 5.4.0RC6 OS: GNU/Linux (Fedora 16)
Private report: No CVE-ID: None
 [2012-01-21 06:53 UTC] fedora at famillecollet dot com
Working on another issue with getColor, I just notice :

From code
/* {{{ proto array GmagickPixel::getColor([boolean as_array = false, normalise_array = false])
	Returns the color of the pixel

But second option (normalise_array) is not accepted.

Trivial attached path fix this minor issue

Test script:
php -r '$color = "rgb(255,255,255)"; $pixel = new GmagickPixel($color); echo $pixel->getColor(true, true);'

Expected result:
array(3) {
  'r' =>
  'g' =>
  'b' =>

Actual result:
Warning: GmagickPixel::getcolor() expects at most 1 parameter, 2 given in Command line code on line 1


gmagick-getcolor.patch (last revision 2012-01-21 06:54 UTC by fedora at famillecollet dot com)

Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2012-01-22 19:39 UTC]
-Status: Open +Status: Assigned -Assigned To: +Assigned To: mkoppanen
 [2012-06-02 05:52 UTC]
Automatic comment from SVN on behalf of remi
Log: fix paramaters according to method proto (fix #60829)
 [2012-06-02 05:53 UTC]
-Status: Assigned +Status: Closed
 [2012-06-02 05:53 UTC]
This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at

 For Windows:
Thank you for the report, and for helping us make PHP better.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Apr 22 16:01:31 2024 UTC