Wedge

Public area => Bug reports => The Pub => Archived fixes => Topic started by: live627 on September 23rd, 2013, 06:29 AM

Title: Random patch
Post by: live627 on September 23rd, 2013, 06:29 AM
Let's remove duplicate code!

Code: [Select]
/Sources/Post.php (working copy)
@@ -243,8 +243,6 @@
  );
  }
 
- $context['post_error'] = array('messages' => array());
-
  // See if any new replies have come along.
  if (empty($_REQUEST['msg']) && !empty($topic))
  {
Title: Re: Random patch
Post by: Nao on September 23rd, 2013, 07:29 PM
Good find!
Isn't it better to remove the second one, though..? The second one is included Inside a test, and there's another access to 'post_error' within another code block outside of it; while it's unlikely that it'll be touched, I'd rather we take this one outside the code block, and thus leave the one at line 243 in, and remove the one at line 360 or so.

Agreed, disagreed..? :^^;:
Title: Re: Random patch
Post by: live627 on September 24th, 2013, 02:39 AM
Agreed.
Title: Re: Random patch
Post by: Nao on September 24th, 2013, 10:26 PM
Thanks, done then.. ;) (Well, you might have seen it, latest rev :P)
Title: Re: Random patch
Post by: live627 on September 25th, 2013, 12:54 AM
Nope, not in the logs.