php.net |  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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: fedora at famillecollet dot com
New email:
PHP Version: OS:

 

 [2012-01-21 06:53 UTC] fedora at famillecollet dot com
Description:
------------
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' =>
  double(1)
  'g' =>
  double(1)
  'b' =>
  double(1)
}


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


Patches

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

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-01-22 19:39 UTC] rasmus@php.net
-Status: Open +Status: Assigned -Assigned To: +Assigned To: mkoppanen
 [2012-06-02 05:52 UTC] remi@php.net
Automatic comment from SVN on behalf of remi
Revision: http://svn.php.net/viewvc/?view=revision&revision=325935
Log: fix paramaters according to method proto (fix #60829)
 [2012-06-02 05:53 UTC] remi@php.net
-Status: Assigned +Status: Closed
 [2012-06-02 05:53 UTC] remi@php.net
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
http://snaps.php.net/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.

http://svn.php.net/viewvc?view=revision&revision=325935
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Feb 05 08:01:30 2025 UTC