php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login

Patch hide-args.patch for CGI/CLI related Bug #61378

Patch version 2012-03-13 19:45 UTC

Return to Bug #61378 | Download this patch
Patch Revisions:

Developer: vrana@php.net

Index: sapi/cli/php_cli.c
===================================================================
--- sapi/cli/php_cli.c	(revision 324200)
+++ sapi/cli/php_cli.c	(working copy)
@@ -146,7 +146,6 @@
 	{'n', 0, "no-php-ini"},
 	{'q', 0, "no-header"}, /* for compatibility with CGI (do not generate HTTP headers) */
 	{'R', 1, "process-code"},
-	{'H', 0, "hide-args"},
 	{'r', 1, "run"},
 	{'s', 0, "syntax-highlight"},
 	{'s', 0, "syntax-highlighting"},
@@ -666,7 +665,6 @@
 	int interactive=0;
 	int lineno = 0;
 	const char *param_error=NULL;
-	int hide_argv = 0;
 
 	zend_try {
 	
@@ -866,9 +864,6 @@
 			case 'z': /* load extension file */
 				zend_load_extension(php_optarg);
 				break;
-			case 'H':
-				hide_argv = 1;
-				break;
 			case 10:
 				behavior=PHP_MODE_REFLECTION_FUNCTION;
 				reflection_what = php_optarg;
@@ -961,13 +956,6 @@
 		CG(start_lineno) = lineno;
 		*arg_excp = arg_free; /* reconstuct argv */
 
-		if (hide_argv) {
-			int i;
-			for (i = 1; i < argc; i++) {
-				memset(argv[i], 0, strlen(argv[i]));
-			}
-		}
-
 		zend_is_auto_global("_SERVER", sizeof("_SERVER")-1 TSRMLS_CC);
 
 		PG(during_request_startup) = 0;
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri May 03 23:01:30 2024 UTC