Repository navigation
Bugfix Issue 704 Undefined Vars WrongReturn DebugEcho
Four PHP bugs fixed across lnl.php, linkto.php, lostPassword.php, and firstLogin.php:
-
lnl.php:129 — undefined
$keyvariable in default switch case -
linkto.php:243 —
init_args()returns boolean instead of args object -
lostPassword.php:53 — undefined
$notevariable -
firstLogin.php:143 — debug
echoleft in production code
Root cause: In the default: case of switch($args->type), line 129 used $key which was never defined. The correct variable is $args->type.
Fix: strpos($key, $needle) → strpos($args->type, $needle)
File: lnl.php:129
Root cause: When a malformed testcase URL (no glue character) is provided, init_args() returned $args->status_ok (a boolean) instead of the $args object. All downstream code expects an object with properties.
Fix: return $args->status_ok; → return $args;
File: linkto.php:243
Root cause: Line 53 referenced bare $note which was never defined. At line 43, $gui->note was set from $result['msg']. The condition should check $gui->note.
Fix: if ($note != "") → if ($gui->note != "")
File: lostPassword.php:53
Root cause: echo '<br>' . __LINE__; was left in production code, outputting debug HTML on every execution of that code path.
Fix: Remove the debug echo line.
File: firstLogin.php:143
-
2492d763c—fix: undefined vars, wrong return, debug echo in lnl/linkto/lostPassword/firstLogin
- All 4 files pass
php -lsyntax check - No PHP warnings generated for undefined variables
- No debug output in HTTP responses
- No new Event Viewer errors