HomeSoftware Heritage

get rid of getvar_emptystring function (#249)

Description

get rid of getvar_emptystring function (#249)

getvar_emptystring is a clone of getvar from stdlib with the only
difference, that it returns an empty string instead of undef. But
getvar_emptystring is always used with pick which handles empty strings and
undef the same way. So there is no need at the moment for getvar_emptystring
and even if there is a need in the future it would be better to use something
like:

(getvar('dummy') == undef) ? { true: '', default: getvar('dummy') }

The reason is that since the copying of the getvar function to
getvar_emptystring the getvar function was updated to not send warnings
regarding undefined variables, but this update was never adopted into the
getvar_emptystring function. And thats the cause for issue #227

Details

Provenance
vicinus <rvicinus@metaways.de>Authored on Nov 14 2017, 3:50 PM
Peter Souter <petems@users.noreply.github.com>Committed on Nov 14 2017, 3:50 PM
vsellierPushed on Sep 24 2020, 2:50 PM
Parents
R226:6c28bc3a9d49: protected-mode configuration option (Redis 3.2+) (#243)
Branches
Unknown
Tags
Unknown

Event Timeline