Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Inconsistent variable names in CustomerBranches.php
01-10-2014, 10:02 PM
Post: #1
Inconsistent variable names in CustomerBranches.php
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
Visit this user's website Find all posts by this user
Quote this message in a reply
01-12-2014, 08:46 PM
Post: #2
RE: Inconsistent variable names in CustomerBranches.php
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.
Visit this user's website Find all posts by this user
Quote this message in a reply
01-13-2014, 07:32 AM
Post: #3
RE: Inconsistent variable names in CustomerBranches.php
Thanks Tim

Phil Daintree
webERP Admin
Logic Works Ltd
http://www.logicworks.co.nz
Visit this user's website Find all posts by this user
Quote this message in a reply
01-13-2014, 09:10 PM
Post: #4
RE: Inconsistent variable names in CustomerBranches.php
Thanks for applying this fix Phil.

Next one is again on a new thread.
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)