mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-09 16:32:39 +01:00
fix PHP 8 "strlen(null)" when moving paths with missing options
Summary: Running ./bin/repository move-paths without specifying --from nor --to leads to the PHP 8 error about strlen() not accepting null parameters. Test Plan: Running ./bin/repository move-paths without --from/--to (shows a proper error) Reviewers: O1 Blessed Committers, speck, valerio.bozzolan Reviewed By: O1 Blessed Committers, speck, valerio.bozzolan Subscribers: aklapper, speck, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno Differential Revision: https://we.phorge.it/D25484
This commit is contained in:
parent
f81e821abf
commit
a7fb04f96c
1 changed files with 2 additions and 2 deletions
|
@ -38,14 +38,14 @@ final class PhabricatorRepositoryManagementMovePathsWorkflow
|
|||
}
|
||||
|
||||
$from = $args->getArg('from');
|
||||
if (!strlen($from)) {
|
||||
if (!phutil_nonempty_string($from)) {
|
||||
throw new Exception(
|
||||
pht(
|
||||
'You must specify a path prefix to move from with --from.'));
|
||||
}
|
||||
|
||||
$to = $args->getArg('to');
|
||||
if (!strlen($to)) {
|
||||
if (!phutil_nonempty_string($to)) {
|
||||
throw new Exception(
|
||||
pht(
|
||||
'You must specify a path prefix to move to with --to.'));
|
||||
|
|
Loading…
Reference in a new issue