This is an automated email from the ASF dual-hosted git repository.

jfthomps pushed a commit to branch VCL-1106_updates_for_php7
in repository https://gitbox.apache.org/repos/asf/vcl.git


The following commit(s) were added to refs/heads/VCL-1106_updates_for_php7 by 
this push:
     new 2154aa0  VCL-1106 - make PHP code compatible with PHP 7
2154aa0 is described below

commit 2154aa0b9ca5183d63e552a09dcc7831cc597e6c
Author: Josh Thompson <jftho...@ncsu.edu>
AuthorDate: Thu Jul 18 13:25:50 2019 -0400

    VCL-1106 - make PHP code compatible with PHP 7
    
    utils.php: modified xmlrpccall xmlrpcgetaffiliations: $HTTP_RAW_POST_DATA 
is deprecated in php 7 - removed global reference to $HTTP_RAW_POST_DATA; now 
get contents of php://input into variable and pass that variable to 
xmlrpc_server_call_method instead of $HTTP_RAW_POST_DATA
---
 web/.ht-inc/utils.php | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/web/.ht-inc/utils.php b/web/.ht-inc/utils.php
index 662ab77..74c7c8c 100644
--- a/web/.ht-inc/utils.php
+++ b/web/.ht-inc/utils.php
@@ -12653,7 +12653,7 @@ function validateEmailAddress($addr) {
 ///
 
////////////////////////////////////////////////////////////////////////////////
 function xmlrpccall() {
-       global $xmlrpc_handle, $HTTP_RAW_POST_DATA, $user;
+       global $xmlrpc_handle, $user;
        # create xmlrpc handle
        $xmlrpc_handle = xmlrpc_server_create();
        # register functions available via rpc calls
@@ -12707,7 +12707,8 @@ function xmlrpccall() {
        xmlrpc_server_register_method($xmlrpc_handle, 
"XMLRPCfinishBaseImageCapture", "xmlRPChandler");
        xmlrpc_server_register_method($xmlrpc_handle, 
"XMLRPCcheckCryptSecrets", "xmlRPChandler");
 
-       print xmlrpc_server_call_method($xmlrpc_handle, $HTTP_RAW_POST_DATA, 
'');
+       $raw_post_data = file_get_contents("php://input");
+       print xmlrpc_server_call_method($xmlrpc_handle, $raw_post_data, '');
        xmlrpc_server_destroy($xmlrpc_handle);
        cleanSemaphore();
        dbDisconnect();
@@ -12722,13 +12723,14 @@ function xmlrpccall() {
 ///
 
////////////////////////////////////////////////////////////////////////////////
 function xmlrpcgetaffiliations() {
-       global $xmlrpc_handle, $HTTP_RAW_POST_DATA;
+       global $xmlrpc_handle;
        # create xmlrpc handle
        $xmlrpc_handle = xmlrpc_server_create();
        # register functions available via rpc calls
        xmlrpc_server_register_method($xmlrpc_handle, "XMLRPCaffiliations", 
"xmlRPChandler");
 
-       print xmlrpc_server_call_method($xmlrpc_handle, $HTTP_RAW_POST_DATA, 
'');
+       $raw_post_data = file_get_contents("php://input");
+       print xmlrpc_server_call_method($xmlrpc_handle, $raw_post_data, '');
        xmlrpc_server_destroy($xmlrpc_handle);
        dbDisconnect();
        exit;

Reply via email to