You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Typo in check_any_debtors function causing potential bug
I noticed a small issue in the check_any_debtors function in people.php which might cause unexpected behavior.
functioncheck_any_debtors($emails) {
global$db;
$get = $db->prepare('SELECT count(*) FROM debtors WHERE email=? AND owner=?');
foreach($emailsas$email) {
$get->execute(array($email, $_SESSION['tabby_loggedin']));
if($get->fetchColumn() > 0) {
returnFALSE;
}
}
return T;
}
In the last line of the function, it should return TRUE instead of T. The current implementation might lead to a runtime error or unexpected behavior since T is not a defined constant in the code.
Proposed solution:
Replace return T; with return TRUE; to fix the issue:
Typo in
check_any_debtors
function causing potential bugI noticed a small issue in the
check_any_debtors
function inpeople.php
which might cause unexpected behavior.In the last line of the function, it should return
TRUE
instead ofT
. The current implementation might lead to a runtime error or unexpected behavior sinceT
is not a defined constant in the code.Proposed solution:
Replace
return T;
withreturn TRUE;
to fix the issue:Please let me know if you have any questions or need further clarification.
The text was updated successfully, but these errors were encountered: