I have an annoying error in my forum (SMF version 1.1.13, http://www.warandtactics.com/smf/index.php) that has to do with the "last edit" and manifests itself in the Display template.
The error does not seem to do much harm, but the daily 70 pages of error messages in the error log are annoying.
The repeated
error msg from my error log:
Lainaa
8: Uninitialized string offset: 0
File: /home/warandta/public_html/smf/Themes/default/Display.template.php
Line: 547
The line in question is contained in the following part of the code (2nd line):
// Show "« Last Edit: Time by Person »" if this post was edited.
if ($settings['show_modify'] && !empty($message['modified']['name']) && $message['member']['group']['id'] !=1)
echo '
« <i>', $txt[211], ': ', $message['modified']['time'], ' ', $txt[525], ' ', $message['modified']['name'], !empty($message['modified']['edit_reason']) ? ', Reason: ' . $message['modified']['edit_reason'] : '' , ' </i> »';
echo '
</td>
<td align="', !$context['right_to_left'] ? 'right' : 'left', '" valign="bottom" class="smalltext">';
The actual line is
if ($settings['show_modify'] && !empty($message['modified']['name']) && $message['member']['group']['id'] !=1)I could not find the same problem described in any of the forums.
Anybody got an idea what might be causing this error?
The forum itself is
heavily modded, but we carry this error for years and long before the mayority of our mods were installed. The
only mod that influences this part of the display is the
"Reason for edit" mod, but I cannot make any sensible connection that would explain the error, as none of the mentioned variables is changed and the only change in Display of this mode is as documented below (this is line 549):
Original code:
echo '
« <i>', $txt[211], ': ', $message['modified']['time'], ' ', $txt[525], ' ', $message['modified']['name'], '</i> »';Replaced with
modded code echo '
« <i>', $txt[211], ': ', $message['modified']['time'], ' ', $txt[525], ' ', $message['modified']['name'], !empty($message['modified']['edit_reason']) ? ', Reason: ' . $message['modified']['edit_reason'] : '' , ' </i> »';Thanks in advance for any help, especially as I did not find anything on the mod support page and am not sure it has to with it alltogether.
Rattler
Lainaus käyttäjältä: tomeh - kesäkuu 10, 2011, 02:33:19 IP
fashion? = modyfications (mod)
O I C.
Answered already in the original post (now highlighted) and with mod code that I am having suspicions about.
Anybody?
Rattler
Thanks.
Was away for some three month, willtry instantly.
Kind regards,
Rattler
Lainaus käyttäjältä: Joker™ - heinäkuu 10, 2011, 07:48:54 AP
I think you need to make these changes in the code
$message['member']['group']['id']
$message['member']['group_id']