Closed (fixed)
Project:
Graphviz Filter
Version:
6.x-1.0
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
25 Nov 2008 at 18:02 UTC
Updated:
14 Mar 2009 at 18:50 UTC
as of "array_fill_keys" help page in php site, there's a contribution by matrebatre stating that this function is the same as "$array = array_combine($keys,array_fill(0,count($keys),$value));"... if it's true, you can achieve php5 compatibility adding the following script (it would be better to place this script in a sort of "heading" place, calling it just one time if possible):
//---- begin script ------------------------------------------
if (!function_exists('array_fill_keys')) {
function array_fill_keys($keys,$value) {
return array_combine($keys,array_fill(0,count($keys),$value));
}
}
//---- end script ------------------------------------------
it immediatly clear that the script above create a new function only if necessary, that is when the original one isn't found.
if you notice that in some cases the equivalence stated is not fully correct, just modify the script above accordingly.
Comments
Comment #1
infojunkieI'm planning to revisit the design of Graphviz Filter. I might not need that patch then.
Comment #2
infojunkieFixed in 6.x-1.3. The module no longer needs that function.