while (l && isspace((int)buf[--l]));
if (l < t) buf[l + 1] = '\0';
+ /* Return last line from the shell command */
+ if (PG(magic_quotes_runtime)) {
+ int len;
+
+ tmp = php_addslashes(buf, 0, &len, 0);
+ RETVAL_STRINGL(tmp,len,0);
+ } else
+ RETVAL_STRINGL(buf,l,1);
} else {
int b, i;
if (output) (void)PUTC(buf[i]);
}
}
-
- /* Return last line from the shell command */
- if (PG(magic_quotes_runtime) && type!=3) {
- int len;
-
- tmp = php_addslashes(buf, 0, &len, 0);
- RETVAL_STRINGL(tmp,len,0);
- }
ret = pclose(fp);
#if HAVE_SYS_WAIT_H