1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2025-03-12 04:14:59 +01:00

Fix PHP 8 exit status cannot be null error in PhutilArgumentParser

Summary:
Passing null as the first parameter ($status) to exit has been deprecated
and leads to a PHP error.

Closes T15990

Test Plan:
Run any bin scripts with PHP 8.4.
`bin/arc version` should finish successfully without PHP errors.

Reviewers: #blessed_committers, O1 Blessed Committers, valerio.bozzolan

Reviewed By: #blessed_committers, O1 Blessed Committers, valerio.bozzolan

Subscribers: aklapper, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Tags: #php_8_support

Maniphest Tasks: T15990

Differential Revision: https://we.phorge.it/D25869
This commit is contained in:
xtex 2025-02-11 09:52:39 +08:00
parent b52ea9932a
commit 1cb8a8d5a9
No known key found for this signature in database
GPG key ID: B918086ED8045B91

View file

@ -491,7 +491,7 @@ final class PhutilArgumentParser extends Phobject {
if ($workflow->isExecutable()) {
$workflow->setArgv($this);
$err = $workflow->execute($this);
exit($err);
exit($err ?? 0);
} else {
return $workflow;
}