diff options
| author | Claude Sonnet 5 | 2026-08-17 19:07:30 +0000 |
|---|---|---|
| committer | Frederick Muriuki Muriithi | 2026-08-17 14:52:12 -0500 |
| commit | 55909cd3cadfd070cd157e78ec2364613ed8ab58 (patch) | |
| tree | b4bc4cc6f10a2adf31477b2b3f3ea0f9261a2323 | |
| parent | e9a320d0ee9c66001da2523d8eef339e63e0c13c (diff) | |
| download | BNW-55909cd3cadfd070cd157e78ec2364613ed8ab58.tar.gz | |
Remove orphaned fwrite() call in runtime_check.php that crashes on PHP 8
$fprows and $lc were never defined anywhere in exe_time(). On PHP 7.4 fwrite() with a null resource argument just emitted warnings and returned false. On PHP 8+, fwrite() requires a resource/false is no longer coerced, so this throws an uncaught TypeError on every call, crashing any page that invokes exe_time() (progress-tracking pages). Verified empirically against PHP 8.3.28: before the fix, calling exe_time() throws TypeError: fwrite(): Argument #1 ($stream) must be of type resource, null given after the fix it returns the computed runtime estimate as before. Reviewed by: Frederick M Muriithi <fredmanglis@gmail.com>
| -rw-r--r-- | sourcecodes/runtime_check.php | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/sourcecodes/runtime_check.php b/sourcecodes/runtime_check.php index 300a197f..7b468957 100644 --- a/sourcecodes/runtime_check.php +++ b/sourcecodes/runtime_check.php @@ -10,8 +10,6 @@ function exe_time($keyval,$parent_number,$k_number) $nrf = $dir.$keyval."nrows.txt"; $nrows=trim(file_get_contents("$nrf")); -fwrite($fprows,"$lc\n"); - $nf=$dir.$keyval."nnode.txt"; $node=trim(file_get_contents("$nf"))-1; $parent_number=$parent_number-1; |
