Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit d828a3b

Browse files
committedDec 16, 2012
Fix undefined access to $l_oServer
1 parent 0735173 commit d828a3b

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed
 

‎api/soap/mantisconnect.php

+3-11
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,8 @@
3131
/**
3232
* Checks if the request for the webservice is a documentation request (eg:
3333
* WSDL) or an actual webservice call.
34-
*
35-
* The implementation of this method is based on soap_server::service() and
36-
* adapted to work independent of the usage of nusoap
37-
*
38-
* @param $p_service The webservice class instance.
39-
* @param $p_data The input that is based on the post data.
4034
*/
41-
function mci_is_webservice_call( $p_service, $p_data )
35+
function mci_is_webservice_call()
4236
{
4337
global $QUERY_STRING;
4438
global $_SERVER;
@@ -53,14 +47,12 @@ function mci_is_webservice_call( $p_service, $p_data )
5347

5448
if ( isset( $t_qs ) && preg_match( '/wsdl/', $t_qs ) ){
5549
return false;
56-
} else if ( $p_data == '' && isset ( $p_service) && $p_service->wsdl ) {
57-
return false;
5850
} else {
5951
return true;
6052
}
6153
}
6254

63-
if ( !mci_is_webservice_call( $l_oServer, $t_input ) ) {
55+
if ( !mci_is_webservice_call() ) {
6456
# if we have a documentation request, do some tidy up to prevent lame bot loops e.g. /mantisconnect.php/mc_enum_etas/mc_project_get_versions/
6557
$parts = explode ( 'mantisconnect.php/', strtolower($_SERVER['SCRIPT_NAME'] ), 2 );
6658
if (isset( $parts[1] ) && (strlen ( $parts[1] ) > 0 ) ) {
@@ -107,7 +99,7 @@ function mci_is_webservice_call( $p_service, $p_data )
10799
# only include the MantisBT / MantisConnect related files, if the current
108100
# request is a webservice call (rather than webservice documentation request,
109101
# eg: WSDL).
110-
if ( mci_is_webservice_call( $l_oServer, $t_input ) ) {
102+
if ( mci_is_webservice_call() ) {
111103
require_once( 'mc_core.php' );
112104
} else {
113105
# if we have a documentation request, do some tidy up to prevent lame bot loops e.g. /mantisconnect.php/mc_enum_etas/mc_project_get_versions/

0 commit comments

Comments
 (0)
Please sign in to comment.