@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

authored by

Jean Guyomarc'h and committed by
Valerio Bozzolan
a7fb04f9 f81e821a

+2 -2
+2 -2
src/applications/repository/management/PhabricatorRepositoryManagementMovePathsWorkflow.php
··· 38 38 } 39 39 40 40 $from = $args->getArg('from'); 41 - if (!strlen($from)) { 41 + if (!phutil_nonempty_string($from)) { 42 42 throw new Exception( 43 43 pht( 44 44 'You must specify a path prefix to move from with --from.')); 45 45 } 46 46 47 47 $to = $args->getArg('to'); 48 - if (!strlen($to)) { 48 + if (!phutil_nonempty_string($to)) { 49 49 throw new Exception( 50 50 pht( 51 51 'You must specify a path prefix to move to with --to.'));