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
PHP 8.x emits E_WARNING: Undefined array key "testprojectName" when planAddTC.php accesses $_SESSION['testprojectName'] without checking if the key exists.
Cause:$_SESSION['testprojectName'] is only set on certain navigation paths (after selecting a project in the navbar). When the page is loaded directly or via a refresh where the session key is missing, PHP 8 emits E_WARNING.
Regression source: PHP 8 changed undefined array key access from E_NOTICE (suppressible) to E_WARNING (always logged).
Fix
Method: Added isset() ternary guard.
// Before (line 421):$args->tproject_name = $_SESSION['testprojectName'];
// After (line 421):$args->tproject_name = isset($_SESSION['testprojectName']) ? $_SESSION['testprojectName'] : '';
Commit:f4456736b — "fix: 43 unique PHP 8 warnings across print.inc.php, buildEdit, planAddTC, printDocOptions, resultsNavigator, and 15+ templates"
Verification
HTTP 200 OK from planAddTC.php with valid session
Zero browser console warnings/errors
Zero PHP E_WARNING output with error_reporting=E_ALL
No syntax errors (php -l lib/plan/planAddTC.php)
Related
Other files with same unguarded pattern (tracked in separate issues): tc_exec_unassign_all.php:79, planUpdateTC.php:135, tc_exec_assignment.php:254