Fatal error: Cannot redeclare unhtmlspecialchars()

9 years 11 months ago #104236 by A1e
I get the following error message when I try to create a new account via the Community Builder Registration page.

Fatal error: Cannot redeclare unhtmlspecialchars() in /home/itsmf/domains/itsmf.biz/public_html/foro/includes/functions.php on line 3758

I have CB Paid Subscriptions plugin installed in Community Builder and I believe this is using the same call as VBulletin. However the files are encrypted so I can't edit them.

Please can you tell me if it is possible to change this in CBSubs to fix the problem (or if you have any other solution)?

This is urgent as we are supposed to be going live for testing tomorrow and it does not work.

Many thanks,

Tom
9 years 11 months ago #104266 by beat
A1e wrote:

I get the following error message when I try to create a new account via the Community Builder Registration page.

Fatal error: Cannot redeclare unhtmlspecialchars() in /home/itsmf/domains/itsmf.biz/public_html/foro/includes/functions.php on line 3758

I have CB Paid Subscriptions plugin installed in Community Builder and I believe this is using the same call as VBulletin. However the files are encrypted so I can't edit them.

Please can you tell me if it is possible to change this in CBSubs to fix the problem (or if you have any other solution)?

This is urgent as we are supposed to be going live for testing tomorrow and it does not work.

Many thanks,

Tom


unhtmlspecialchars is not defined in CBSubs but is defined in CB in file:

administrator/components/com_comprofiler/comprofiler.class.php around line 1567.

You need to check that the functions are same (i don't know about the vBulletin one), then you could add in vBulletin (as it defines it after CB ):

Before the function definition:

[code:1]if ( ! is_callable( 'unHtmlspecialchars' ) ) {[/code:1]

After the function definition:
[code:1]}[/code:1]

In CB it would look like:

[code:1]if ( ! is_callable( 'unHtmlspecialchars' ) ) {
function unHtmlspecialchars( $text ) {
return cbUnHtmlspecialchars( $text );
}
}[/code:1]

but you need to do that in vBulletin, as CB defines (and needs it) first.

Beat - Community Builder Team Member

Before posting on forums: Read FAQ thoroughly -- Help us spend more time coding by helping others in this forum, many thanks :)
CB links: Our membership - CBSubs - Templates - Hosting - Forge - Send me a Private Message (PM) only for private/confidential info
Moderators: beatnantkrileon
Time to create page: 0.374 seconds
Facebook Twitter Google LinkedIn