Error after install... trying to generate color picker
sigpi007 - September 19, 2008 - 15:08
| Project: | Color.module: Next generation |
| Version: | 6.x-1.x-dev |
| Component: | Themes |
| Category: | bug report |
| Priority: | normal |
| Assigned: | skiquel |
| Status: | closed |
Jump to:
Description
An error occurred. /?q=batch&id=6&op=do
Fatal error: Call to undefined function: array_combine() in /homepages/43/d93997458/htdocs/Test/modules/color/color.generate.inc on line 29
Happened after install...
Set Download method to "public"
In garland theme... clicked "generate schemes and enable"
BAM... error message above occurred.
I'm so close... would love some help with this.

#1
I am guessing you are using PHP 4, which surprisingly doesn't have this function.
I have committed a fix (You can grab it from the CVS right now). If PHP 4 was the problem, the 6.x branch will cover it. Be advised 7.x branch (just like the core) will not have support for PHP4.
Can you tell me if that worked? Did any other bugs pop up? I am having trouble getting PHP 4 to work on my side.
#2
I'm getting this error with the latest dev (sep 21) snapshot,
An error occurred. /themes/batch?id=11&op=do <br /> <b>Fatal error</b>: Call to undefined function color_array_combine() in <b>C:\wamp\www\themes\modules\color\color.generate.inc</b> on line <b>29</b><br />Using PHP 5.
#3
Hi.
Please head to color.generate.inc's color_generate_scheme_files(). Does it look like this?
<?php
function color_generate_scheme_files(&$scheme, $theme) {
module_load_include('inc', 'color', 'color.database');
module_load_include('inc', 'color', 'color.misc');
module_load_include('inc', 'color', 'color.stylesheet');
$reference = color_array_combine($theme['fields'], $theme['reference scheme']['hex']);
$palette = color_array_combine($theme['fields'], $scheme['hex']);
// ... so on
?>
also in color.misc.inc, do you see the color_array_combine()?
<?php
function color_array_combine($keys, $vals) {
// $keys = array_values($keys);
//$vals = array_values($vals);
$combined = array();
foreach ($keys as $key) {
$combined[$key] = array_shift($vals);
}
return $combined;
}
?>
#4
For me this is fixed - for some weird ass reason color.generate.inc never copied to my testing server, doh!
#5
I'll put this on fixed for now.
#6
Automatically closed -- issue fixed for two weeks with no activity.