Array to string conversion error

Started by crash56, August 28, 2013, 06:17:09 AM

Previous topic - Next topic

crash56

Good morning,

My forum just began showing this error:

8: Array to string conversion
File: /home/terrafir/public_html/Sources/Subs.php
Line: 2471

I am running SMF 1.1.18.

Modification Packages:

Stop Forum Spam
Create Topic on Report to Moderator
Wrap Text Around Image
YouTube BBCode
RemoveQuotedImages

Line 2471 of the Subs.php file is:

$code = strtr($tag['content'], array('$1' => $data));

Edited to add:

In case it helps, the entire 'paragraph' containing that line is:

// Don't parse the content, just skip it.
elseif ($tag['type'] == 'unparsed_content')
{
$pos2 = stripos($message, '[/' . substr($message, $pos + 1, strlen($tag['tag'])) . ']', $pos1);
if ($pos2 === false)
continue;

$data = substr($message, $pos1, $pos2 - $pos1);

if (!empty($tag['block_level']) && substr($data, 0, 6) == '<br />')
$data = substr($data, 6);

if (isset($tag['validate']))
$tag['validate']($tag, $data, $disabled);

$code = strtr($tag['content'], array('$1' => $data));
$message = substr($message, 0, $pos) . $code . substr($message, $pos2 + 3 + strlen($tag['tag']));
$pos += strlen($code) - 1;
}



Any suggestions what has happened to begin generating this error, and what I need to do to get rid of it?

Help, please?

Thanks!

Arantor

It looks like the YouTube bbcode mod, since the error isn't actually in the code you've mentioned but generated because somewhere else in the code the list of bbc is misdefined.

crash56

That did it!  I uninstalled the package, and the error messages stopped.  Thank you!  (I break out in hives at the sight of error messages, so I greatly appreciate getting rid of them ... the errors, not the hives ... or both maybe.  ;D )

Advertisement: