Come together with the global Drupal community in Rotterdam, 28 Sept – 1 Oct 2026. Sessions, contribution, connection, and Early Bird savings until 8 June.
Odd. I would have expected it to say "hex_to_rgb() already declared in ???"
Where xxx would be useful to know.
It seems that some other module has also been lazy and left off the module name as a prefix - which is the convention.
So at the moment this issue is a conflict with ???
It can be fixed at this end. I'll tidy it up some time.
In the meantime you can either id whatever is conflicting, or as a quick hack, wrap that function (in link 128 utility.inc as it says) inside
if (! function_exists('hex_to_rgb')) {
function hex_to_rgb(
....
}
}
... although that may not work as expected. Need to know where the other declaration is.
Comments
Comment #1
dman commented... and what does the rest of the error message say?
Comment #2
socialnicheguru commentedThat is all that is printed to my conole. it is not logged in watchdog.
Comment #3
dman commentedOdd. I would have expected it to say "hex_to_rgb() already declared in ???"
Where xxx would be useful to know.
It seems that some other module has also been lazy and left off the module name as a prefix - which is the convention.
So at the moment this issue is a conflict with ???
It can be fixed at this end. I'll tidy it up some time.
In the meantime you can either id whatever is conflicting, or as a quick hack, wrap that function (in link 128 utility.inc as it says) inside
... although that may not work as expected. Need to know where the other declaration is.
Comment #4
socialnicheguru commenteddid a grep in my modules directory: dynamic_image also declares function hex_to_rgb
Comment #5
dman commentedCool, that's an answer.
We are both being badly behaved modules.
... at least I only declare that function when I'm actually building the image :-)
I'll rename the func better in dev sometime.
Comment #6
dman commentedRenamed, and using the imageapi hex function where I can