$_SERVER['FRANKENPHP_WORKER'] must not be NULL-terminated

This commit is contained in:
Kévin Dunglas
2024-05-21 17:34:03 +02:00
parent c894a92135
commit 3d065eda35
2 changed files with 2 additions and 2 deletions

View File

@@ -1,7 +1,7 @@
<?php
$fn = require $_SERVER['SCRIPT_FILENAME'];
if (!isset($_SERVER['FRANKENPHP_WORKER'])) {
if ('1' !== ($_SERVER['FRANKENPHP_WORKER'] ?? null)) {
$fn();
exit(0);
}

View File

@@ -53,7 +53,7 @@ func startWorkers(fileName string, nbWorkers int, env PreparedEnv) error {
env = make(PreparedEnv, 1)
}
env["FRANKENPHP_WORKER\x00"] = "1\x00"
env["FRANKENPHP_WORKER\x00"] = "1"
l := getLogger()
for i := 0; i < nbWorkers; i++ {