fix: 4 critical bugs — worker argv, student dashboard visibility, teacher onboarding flow, password validation
This commit is contained in:
@@ -73,9 +73,10 @@ class CurriculumController
|
||||
error_reporting(E_ALL);
|
||||
ob_start();
|
||||
|
||||
// Execute the script logic natively by setting argv
|
||||
$argv = ['curriculum_worker.php', $taskId];
|
||||
$_SERVER['argv'] = $argv;
|
||||
// CRITICAL: Set $GLOBALS['argv'] so the required worker script can access $argv[1]
|
||||
// (In a web request, $argv is empty — we must set it globally before requiring the worker)
|
||||
$GLOBALS['argv'] = ['curriculum_worker.php', $taskId];
|
||||
$_SERVER['argv'] = $GLOBALS['argv'];
|
||||
|
||||
require $scriptPath;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user