|
$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>
|