Inconsistent variable names in CustomerBranches.php - Printable Version +- webERP Forum (http://www.weberp.org/forum) +-- Forum: webERP Discussion (http://www.weberp.org/forum/forumdisplay.php?fid=1) +--- Forum: Problems / Bugs? (http://www.weberp.org/forum/forumdisplay.php?fid=8) +--- Thread: Inconsistent variable names in CustomerBranches.php (/showthread.php?tid=2022) |
Inconsistent variable names in CustomerBranches.php - Forums - 01-10-2014 In CustomerBranches.php line 343 we have the following: $sql="DELETE FROM custbranch WHERE branchcode='" . $SelectedBranch . "' AND debtorno='" . $DebtorNo . "'"; and then in line 345 we have: $SQL .= " AND custbranch.salesman='" . $_SESSION['SalesmanLogin'] . "'"; as you can see the variable names are different cases, so the second one wont get applied. So ,line 345 should read: $sql .= " AND custbranch.salesman='" . $_SESSION['SalesmanLogin'] . "'"; Maybe we should standardise throughout the code base on using either $SQL (that seems closer to the coding guidelines) or $sql as there are a lot of these sorts of error? Just a note for developers, this kind of error can be found when you are developing by setting error_reporting to -1 in your config.php file. Thanks Tim RE: Inconsistent variable names in CustomerBranches.php - Forums - 01-12-2014 Good to see Phil has just applied my fix for this. Just a note for the future: It is normal courtesy in Free software projects when committing a fix to credit the person who sent the fix in rather than credit yourself. I will start a new thread for the next fix. RE: Inconsistent variable names in CustomerBranches.php - phil - 01-13-2014 Thanks Tim RE: Inconsistent variable names in CustomerBranches.php - Forums - 01-13-2014 Thanks for applying this fix Phil. Next one is again on a new thread. |