News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Fatal error: Call to undefined function codeset()

Started by Nityananda Maity, October 03, 2012, 05:17:15 AM

Previous topic - Next topic

Nityananda Maity

Hi, I am in trouble....please help me.
when i click and try to 'modify' any of my message it's showing error with Fatal error: Call to undefined function codeset() in /home/hopmotm1/public_html/forum/Sources/Subs.php on line 1788
please tell me what to do. also i am not a coder.
thanks

kat

I'm afraid that I don't have the facility to open Excel files.

This block of code is what's causing the error:

if ($parse_tags !== array() && is_array($parse_tags))
{
$temp_bbc = $bbc_codes;
$tags_cache_id = implode(',', $parse_tags);

if (!isset($default_disabled))
$default_disabled = is/codeset($disabled) ? $disabled : array();

if (isset($parse_tag_cache[$tags_cache_id]))
list ($bbc_codes, $disabled) = $parse_tag_cache[$tags_cache_id];
else
{
foreach ($bbc_codes as $key_bbc => $bbc)
foreach ($bbc as $key_code => $code)
if (!in_array($code['tag'], $parse_tags))
{
$disabled[$code['tag']] = true;
unset($bbc_codes[$key_bbc][$key_code]);
}

$parse_tag_cache = array($tags_cache_id => array($bbc_codes, $disabled));
}
}
elseif (isset($default_disabled))
$disabled = $default_disabled;

if (strpos($message, '[cutoff]') !== false)
$message = str_replace('[cutoff]', '', $message);



//So i parse now the unhidden bbc code one time ;)
if($modSettings['hide_preparedOption']['parse_content']) {
$modSettings['hide_preparedOption']['parse_content'] = false;
if(isset($bbc_codes['h'])) {
foreach($bbc_codes['h'] as $key => $item) {
if($item['tag'] == 'hide') {
$bbc_codes['h'][$key]['before'] = parse_bbc($item['before']);
$bbc_codes['h'][$key]['after'] = parse_bbc($item['after']);
break;
}
}
}
}



Do you have a BBC mod installed?

Shambles

Looks to me like an edit went awry

$default_disabled = is/codeset($disabled) ? $disabled : array();

probably should read

$default_disabled = isset($disabled) ? $disabled : array();

Somehow, a /code got inserted right there.

Try removing that rogue bit, tho you may find other problems later on, if someone's edit went that wrong.

I attached an edited copy.

Nityananda Maity

i attached my mod details currently installed on my board and also uninstalled.

@Shambles™ I will check this soon.

Nityananda Maity

Shambles™ thank you so much. It works ok and thanks to all of great SMF stuff to help me.
So, this time explain me from where this code came?

kat

Good stuff, Shambles! :)

Maybe the Table Plus BBCodes mod?

Or, BBC Permission Mod?

Although you say it's uninstalled, maybe some code from the "BB code with style" mod didn't get removed?

If you check the parser, on the mod's download page, you can see what edits are made. :)

Nityananda Maity

All day, checked parser on mod download page, one by one mod but didn't find. I also made some manual edits previously (using some post/tutorial on smf), its can cause this problem.

kat

Look at it this this way...

Shambles got you fixed-up.

So, everything works. :)

Why worry about it, now? ;)

Nityananda Maity

Ok, But The main problem is, I do not know PHP and go to edit it. :'(
no problem, i will learn it later.
Thanks K@

kat

Oh, I'm not so good as php, myself.

As long as you remember to keep copies of the original files, before you edit them, as backups, you'll get along just fine. :)

Advertisement: