faral RC
faral RC

Reputation: 1

Weird Fatal error: Cannot redeclare function

I have error with odd values like

PHP Fatal error: Cannot redeclare chkconfig() (previously declared in D\x01:27)

PHP Fatal error: Cannot redeclare chkconfig() (previously declared in (\x93\x03u\xa2\x7f:27)

PHP Fatal error: Cannot redeclare chkconfig() (previously declared in \x98\xe9\xc6t\xa2\x7f:27)

PHP Fatal error: Cannot redeclare chkconfig() (previously declared in Wut\xa2\x7f:27)

PHP Fatal error: Cannot redeclare chkconfig() (previously declared in @.\xf7t\xa2\x7f:27)

but it is not declare in any other place. What means that odd values?

Upvotes: 0

Views: 747

Answers (1)

Rax Weber
Rax Weber

Reputation: 3780

You can just try this:

if (!function_exists('chkconfig')) {
    // declare your function
}

So that if it does exist, you won't have to redeclare it anymore.

Upvotes: 2

Related Questions