Advertisement
Guest User

Sjoerd

a guest
Oct 14th, 2009
547
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.53 KB | None | 0 0
  1. Index: ext/standard/basic_functions.c
  2. ===================================================================
  3. --- ext/standard/basic_functions.c  (revision 288893)
  4. +++ ext/standard/basic_functions.c  (working copy)
  5. @@ -6037,9 +6037,10 @@
  6.     int types_len;
  7.     zval *prefix = NULL;
  8.     char *p;
  9. +   zend_bool successful = 0;
  10.  
  11.     if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|z/", &types, &types_len, &prefix) == FAILURE) {
  12. -       return;
  13. +       RETURN_FALSE;
  14.     }
  15.  
  16.     if (ZEND_NUM_ARGS() > 1) {
  17. @@ -6059,24 +6060,31 @@
  18.             case 'g':
  19.             case 'G':
  20.                 zend_hash_apply_with_arguments(Z_ARRVAL_P(PG(http_globals)[TRACK_VARS_GET]) TSRMLS_CC, (apply_func_args_t) copy_request_variable, 1, prefix);
  21. +               successful = 1;
  22.                 break;
  23.  
  24.             case 'p':
  25.             case 'P':
  26.                 zend_hash_apply_with_arguments(Z_ARRVAL_P(PG(http_globals)[TRACK_VARS_POST]) TSRMLS_CC, (apply_func_args_t) copy_request_variable, 1, prefix);
  27.                 zend_hash_apply_with_arguments(Z_ARRVAL_P(PG(http_globals)[TRACK_VARS_FILES]) TSRMLS_CC, (apply_func_args_t) copy_request_variable, 1, prefix);
  28. +               successful = 1;
  29.                 break;
  30.  
  31.             case 'c':
  32.             case 'C':
  33.                 zend_hash_apply_with_arguments(Z_ARRVAL_P(PG(http_globals)[TRACK_VARS_COOKIE]) TSRMLS_CC, (apply_func_args_t) copy_request_variable, 1, prefix);
  34. +               successful = 1;
  35.                 break;
  36. +           default:
  37. +               php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Unsupported type character '%c'", *p);
  38. +               break;
  39.         }
  40.     }
  41.  
  42.     if (ZEND_NUM_ARGS() < 2) {
  43.         zval_ptr_dtor(&prefix);
  44.     }
  45. +   RETURN_BOOL(successful);
  46.  }
  47.  /* }}} */
  48.  
  49.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement