customformatters.com icon indicating copy to clipboard operation
customformatters.com copied to clipboard

Function problem inside formatter

Open stevefister opened this issue 12 years ago • 0 comments

Hey guys,

Having a problem. I am using a custom function in a custom formatter and am receiving errors on the search results page because it is trying to redeclare the function. I have tried:

if (function_exists('myfunction') != true) {

function myfunction { ... }

}

but then I receive an error that the function is undefined. Any ideas on where I can place this function, maybe at a higher level, where it can be defined once?

Thanks!

stevefister avatar Sep 06 '13 19:09 stevefister