cvs: php4 /ext/standard exec.c

From: Date: Tue, 01 Aug 2000 07:22:59 +0000
Subject: cvs: php4 /ext/standard exec.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-1000@lists.php.net to get a copy of this message
stas Tue Aug 1 00:22:59 2000 EDT Modified files: /php4/ext/standard exec.c Log: When output is empty, exec should return "", not "\0" (#5775) @- Fixed exec() returning "\0" when output is empty Index: php4/ext/standard/exec.c diff -u php4/ext/standard/exec.c:1.37 php4/ext/standard/exec.c:1.38 --- php4/ext/standard/exec.c:1.37 Mon Jun 26 10:12:38 2000 +++ php4/ext/standard/exec.c Tue Aug 1 00:22:59 2000 @@ -15,7 +15,7 @@ | Author: Rasmus Lerdorf | +----------------------------------------------------------------------+ */ -/* $Id: exec.c,v 1.37 2000/06/26 17:12:38 stas Exp $ */ +/* $Id: exec.c,v 1.38 2000/08/01 07:22:59 stas Exp $ */ #include <stdio.h> #include "php.h" @@ -172,8 +172,9 @@ tmp = php_addslashes(buf, 0, &len, 0); RETVAL_STRINGL(tmp,len,0); - } else - RETVAL_STRINGL(buf,l+1,1); + } else { + RETVAL_STRINGL(buf,l?l+1:0,1); + } } else { int b, i;

« previous php.cvs (#1000) next »