Jump to content

What is the difference between and issue and a bug?


alvin567

Recommended Posts

Well a bug is particularly involved with what your code does. If your script has a bug, it indicates that you either makes syntax error, or that your script is insecure inherently, or perhaps the script does something different than you want it to.

 

An issue is much more complicated. Your script may appear just fine and work normally, but it is resource-intensive because it is not optimized or that you use newbie code. This code below, for instance, is a perfect example for a script that does not have any bugs but has an issue:

 

$i = 0;
while($i<1){
// load database information from mysql, sqlite or whatever
$i++;

}

 

See? The script works normally on your site and you wont notice any fatal errors or warnings. It does not have a bug, but it has an issue. The while loop runs only once, even amateurs dont do this! To amend it, you can use mysql_fetch_assoc() in your while loop, or a PDO statement object if you use PDO. This will fix the issue in your script. If you remove the increment $i++ however, it will be a bug since you create an infinite loop.

 

To summarize, a bug is a subset of an issue, an issue can be more than just a bug. Hopefully this helps.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.