News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Syntax Error in Post.template.php

Started by TehCraw, November 19, 2010, 09:02:32 PM

Previous topic - Next topic

TehCraw

It seems that there's a space between between the "id" attribute its' value in the checkbox input. Line 442 of Post.template.php.


foreach ($context['current_attachments'] as $attachment)
echo '
<dd class="smalltext">
<label for="attachment_', $attachment['id'], '"><input type="checkbox" id= "attachment_', $attachment['id'], '" name="attach_del[]" value="', $attachment['id'], '"', empty($attachment['unchecked']) ? ' checked="checked"' : '', ' class="input_check" /> ', $attachment['name'], (empty($attachment['approved']) ? ' (' . $txt['awaiting_approval'] . ')' : ''), '</label>
</dd>';


Should be:

foreach ($context['current_attachments'] as $attachment)
echo '
<dd class="smalltext">
<label for="attachment_', $attachment['id'], '"><input type="checkbox" id="attachment_', $attachment['id'], '" name="attach_del[]" value="', $attachment['id'], '"', empty($attachment['unchecked']) ? ' checked="checked"' : '', ' class="input_check" /> ', $attachment['name'], (empty($attachment['approved']) ? ' (' . $txt['awaiting_approval'] . ')' : ''), '</label>
</dd>';

Any fool can write code that a computer can understand. Good programmers write code that humans can understand. - Martin Fowler

Norv

To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

TehCraw

Any time.  ;D

You guys are doing a great job.
Any fool can write code that a computer can understand. Good programmers write code that humans can understand. - Martin Fowler

Advertisement: