Cannot redeclare function php

Cannot redeclare function php

You (or Joomla) is likely including this file multiple times. Enclose your function in a conditional block:

n

if (!function_exists(parseDate)) {n    // ... proceed to declare your functionn}n

Remove the function and check the output of:

n

n

var_dump(function_exists(parseDate));n

n

In which case, change the name of the function.

n

If you get false, youre including the file with that function twice, replace :

n

includen

n

by

n

include_oncen

n

And replace :

n

requiren

n

by

n

require_oncen

n

EDIT : Im just a little too late, post before beat me to it !

Cannot redeclare function php

Leave a Reply

Your email address will not be published.