=================================================================== RCS file: /repository/php3/functions/exec.c,v retrieving revision 1.90 retrieving revision 1.91 diff -u -r1.90 -r1.91 --- ../php/functions/exec.c 2000/02/20 20:42:14 1.90 +++ ../php/functions/exec.c 2000/03/20 06:43:57 1.91 @@ -23,10 +23,10 @@ | If you did not, or have any questions about PHP licensing, please | | contact core@php.net. | +----------------------------------------------------------------------+ - | Author: Rasmus Lerdorf | + | Author: Rasmus Lerdorf | +----------------------------------------------------------------------+ */ -/* $Id: exec.c,v 1.90 2000/02/20 20:42:14 eschmid Exp $ */ +/* $Id: exec.c,v 1.91 2000/03/20 06:43:57 rasmus Exp $ */ #include #include "php.h" #include @@ -209,11 +209,15 @@ } /* Return last line from the shell command */ - if (php3_ini.magic_quotes_runtime && type!=3) { - int len; + if (type!=3) { + if(php3_ini.magic_quotes_runtime) { + int len; - tmp = _php3_addslashes(buf, 0, &len, 0); - RETVAL_STRINGL(tmp,len,0); + tmp = _php3_addslashes(buf, 0, &len, 0); + RETVAL_STRINGL(tmp,len,0); + } else { + RETVAL_STRING(buf,1); + } } ret = pclose(fp);