HTTPSFuture error message generation

Hello,

Just a small bug in HTTPSFuture, in line 154, exeption try to generate message with pht.
Message need a parameter as the result of th ‘%S’ in string but there is no parameter :

    if (Filesystem::pathExists($download_path)) {
      throw new Exception(
        pht(
          'Specified download path "%s" already exists, refusing to '.
          'overwrite.'));
    }

#0 PhutilErrorHandler::handleError(integer, string, string, integer, array)
#1 vsprintf(string, array) called at [\src\internationalization\PhutilTranslator.php:142]
#2 PhutilTranslator::translate(string) called at [\src\internationalization\pht.php:17]
#3 pht(string) called at [\src\future\http\HTTPSFuture.php:154]

1 Like

Thanks, this is upstream as https://secure.phabricator.com/T13577.

This should be fixed by https://secure.phabricator.com/D21454.

This error is supposed to be detected statically, but was not because of a bug in the linter when the static format parameter to an xsprintf()-family function was supplied as an n_CONCATENATION_LIST or n_HEREDOC. See https://secure.phabricator.com/T13577 for additional context and approximately 25 similar fixes in arcanist/ and phabricator/.