News:

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

Main Menu

Error Log - 8: Array to string conversion

Started by Valtam, March 14, 2018, 10:32:48 PM

Previous topic - Next topic

Valtam

Hi folks,

Just checked our Logs section under Admin and the majority of them show this error:

https://www.linuxliteos.com/forums/index.php?pretty;board=installing-software;topic=opera-browser-install.0
Apply Filter: Only show the errors with the same message
8: Array to string conversion
Apply Filter: Only show the errors from this file
File: /home/patho/public_html/forums/Themes/Astonished/Display.template.php
Line: 584


Here are Lines 581 - 587 in /home/patho/public_html/forums/Themes/Astonished/Display.template.php

// Show "� Last Edit: Time by Person �" if this post was edited.
if ($settings['show_modify'] && !empty($message['modified']['name']))
echo '
&#171; <em>', $txt['last_edit'], ': ', $message['modified']['time'], ' ', $txt['by'], ' ', $message['modified']['name'], !empty($message['modified']) ? ', '.$txt['reason'].': ' . $message['modified'] : '' , '  </em> &#187;';

echo '
</div>


Line 584 specifically:

&#171; <em>', $txt['last_edit'], ': ', $message['modified']['time'], ' ', $txt['by'], ' ', $message['modified']['name'], !empty($message['modified']) ? ', '.$txt['reason'].': ' . $message['modified'] : '' , '  </em> &#187;';

Does someone have some insight to this issue?

Thank you :)

Sir Osis of Liver

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Valtam


Valtam

Here is the whole file if it helps. Thank you.

Sir Osis of Liver

Core code looks like this -



     « <em>', $txt['last_edit'], ': ', $message['modified']['time'], ' ', $txt['by'], ' ', $message['modified']['name'], '</em> »';



Mod changes it to this -



     « <em>', $txt['last_edit'], ': ', $message['modified']['time'], ' ', $txt['by'], ' ', $message['modified']['name'], !empty($message['modified']['edit_reason']) ? ', '.$txt['reason'].': ' . $message['modified']['edit_reason'] : '' , ' </em> »';



You have this -



     « <em>', $txt['last_edit'], ': ', $message['modified']['time'], ' ', $txt['by'], ' ', $message['modified']['name'], !empty($message['modified']) ? ', '.$txt['reason'].': ' . $message['modified'] : '' , '  </em> »';



$message['modified'][ ] is a two dimensional array, second parameter is missing from the two mod variables.  Looks like the mod didn't uninstall cleanly.  Replace that line with core code, that should stop the errors. 
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Valtam

Thank you Sir Osis of Liver, I used:

<em>', $txt['last_edit'], ': ', $message['modified']['time'], ' ', $txt['by'], ' ', $message['modified']['name'], '</em>';

and it worked fine. No more error logs. You rock ;)

aegersz

he does, he's a SMF Support legend, is cirrhosis.

The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

Advertisement: