diff options
author | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2006-04-05 19:45:42 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2006-04-05 19:45:42 +0000 |
commit | 9ae3433d9acf2239ad936d472a709712f4962dc3 (patch) | |
tree | 9e519a81b5f224cfbb1be0e5c3f83e1874ca679f /mg.c | |
parent | 2c1c1caaefc9a6157e7d86987f121276e2115620 (diff) | |
download | perl-9ae3433d9acf2239ad936d472a709712f4962dc3.tar.gz |
Assigning undef to an entry in %ENV shouldn't produce warnings, even
though it's silently converted to ""
p4raw-id: //depot/perl@27725
Diffstat (limited to 'mg.c')
-rw-r--r-- | mg.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1042,8 +1042,8 @@ int Perl_magic_setenv(pTHX_ SV *sv, MAGIC *mg) { dVAR; - STRLEN len, klen; - const char *s = SvPV_const(sv,len); + STRLEN len = 0, klen; + const char *s = SvOK(sv) ? SvPV_const(sv,len) : ""; const char * const ptr = MgPV_const(mg,klen); my_setenv(ptr, s); |