php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #64622 The variable $color_fondo, is not used.
Submitted: 2013-04-10 11:57 UTC Modified: 2015-03-29 10:07 UTC
Votes:4
Avg. Score:2.0 ± 1.2
Reproduced:0 of 2 (0.0%)
From: noel_fb at hotmail dot com Assigned: kalle (profile)
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS: Windows
Private report: No CVE-ID: None
 [2013-04-10 11:57 UTC] noel_fb at hotmail dot com
Description:
------------
---
From manual page: http://www.php.net/function.imagecreate#refsect1-function.imagecreate-examples
---
The variable $color_fondo, is not used.

Expected result:
----------------
the variable must be used

Actual result:
--------------
the variable is not used

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-05-06 00:37 UTC] pete at petermcdonald dot co dot uk
The colour specified by $color_fondo is setting the background colour as can be 
demonstrated by using the sample code then changing the numerical values.
 [2013-05-06 00:41 UTC] pete at petermcdonald dot co dot uk
To further my previous comment this behaviour is explained in the documentation on 
imagecolorallocate

"The first call to imagecolorallocate() fills the background color in palette-
based images - images created using imagecreate()."
  
http://uk3.php.net/manual/en/function.imagecolorallocate.php
 [2013-05-06 11:41 UTC] noel_fb at hotmail dot com
Can I help to solve de fix? Or i'm not access to edith the example?
 [2013-05-06 12:00 UTC] pete at petermcdonald dot co dot uk
Hi Noel

There is nothing actually to fix. The $color_mondo variable sets the black background color that shows in the example image. I understand the example is slightly confusing but the addition of this is necessary for the example to work.

The inclusion of $color_mondo is in line with the behaviour of imagecolorallocate()
 [2013-05-06 16:30 UTC] noel_fb at hotmail dot com
Hi Pete,
"the addition of this is necessary for the example to work."
Really?
If is not used, I do not give an error when we delete it.

But, Ok. Tanks!, Close the bug.
See you!
 [2015-03-29 10:07 UTC] kalle@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: kalle
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Tue Oct 06 11:00:02 2026 UTC