MyBB Community Forums

Full Version: How to report duplicate/redundant/unneccessary code?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Wondering how I would report this to the issue tracker since it isn't really a bug, nor is it a feature request...

In inc/class_parser.php (1.4.10) on line 848 you have an if that should never be executed. It also as a bad preg_match().

Lines 838-851:
		if(!preg_match("#^[a-z0-9]+://#i", $url))
		{
			$url = "http://".$url;
		}
		$fullurl = $url;

		$url = str_replace('&', '&', $url);
		$name = str_replace('&', '&', $name);


		if(!preg_match("#[a-z0-9]+://#i", $fullurl))
		{
			$fullurl = "http://".$fullurl;
		}

As you can see, the preg_match() in the second if is missing the ^ character to match line start only, however it is a redundant if statement since the first one will have done this to $url before the $fullurl = url;.

Should I report this as a bug with low priority?
(2009-12-08, 05:39 PM)ralgith Wrote: [ -> ]Should I report this as a bug with low priority?

I'd go with that.
Ok, I figured, but I wanted to make sure first Wink
Reporting now.
And then of course I forgot to change the priority... so its posted as Normal pri for now. Oh well.
Don't set the priority (Just keep it at the default normal). That's for the developers to set only.
Gotcha, I didn't anyways, and was only going to because Matt agreed it was right Toungue
I thought it was OK to set it to low but nothing higher than normal, but OK Toungue
(2009-12-09, 06:06 PM)MattRogowski Wrote: [ -> ]I thought it was OK to set it to low but nothing higher than normal, but OK Toungue

I thought the same, so when you agreed with me, I was gonna roll with it. Smile
(2009-12-09, 06:06 PM)MattRogowski Wrote: [ -> ]I thought it was OK to set it to low but nothing higher than normal, but OK Toungue

And what if it ends up being a normal priority?

Priority is too subjective for the average user. Basically just set all bug reports to their default normal selection. If a change is needed, a qualified developer can make that change.
Then perhaps disallow normal users setting that (and other fields you don't want them to mess with, like target version)
We can't, otherwise we would.
Pages: 1 2