Issues (1751)

Security Analysis    not enabled

This project does not seem to handle request data directly as such no vulnerable execution paths were found.

  Cross-Site Scripting
Cross-Site Scripting enables an attacker to inject code into the response of a web-request that is viewed by other users. It can for example be used to bypass access controls, or even to take over other users' accounts.
  File Exposure
File Exposure allows an attacker to gain access to local files that he should not be able to access. These files can for example include database credentials, or other configuration files.
  File Manipulation
File Manipulation enables an attacker to write custom data to files. This potentially leads to injection of arbitrary code on the server.
  Object Injection
Object Injection enables an attacker to inject an object into PHP code, and can lead to arbitrary code execution, file exposure, or file manipulation attacks.
  Code Injection
Code Injection enables an attacker to execute arbitrary code on the server.
  Response Splitting
Response Splitting can be used to send arbitrary responses.
  File Inclusion
File Inclusion enables an attacker to inject custom files into PHP's file loading mechanism, either explicitly passed to include, or for example via PHP's auto-loading mechanism.
  Command Injection
Command Injection enables an attacker to inject a shell command that is execute with the privileges of the web-server. This can be used to expose sensitive data, or gain access of your server.
  SQL Injection
SQL Injection enables an attacker to execute arbitrary SQL code on your database server gaining access to user data, or manipulating user data.
  XPath Injection
XPath Injection enables an attacker to modify the parts of XML document that are read. If that XML document is for example used for authentication, this can lead to further vulnerabilities similar to SQL Injection.
  LDAP Injection
LDAP Injection enables an attacker to inject LDAP statements potentially granting permission to run unauthorized queries, or modify content inside the LDAP tree.
  Header Injection
  Other Vulnerability
This category comprises other attack vectors such as manipulating the PHP runtime, loading custom extensions, freezing the runtime, or similar.
  Regex Injection
Regex Injection enables an attacker to execute arbitrary code in your PHP process.
  XML Injection
XML Injection enables an attacker to read files on your local filesystem including configuration files, or can be abused to freeze your web-server process.
  Variable Injection
Variable Injection enables an attacker to overwrite program variables with custom data, and can lead to further vulnerabilities.
Unfortunately, the security analysis is currently not available for your project. If you are a non-commercial open-source project, please contact support to gain access.

lib/includes/loader.soap.php (38 issues)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
    /******************************************************************
3
     loader.soap.php                                       Muze Ariadne
4
     ------------------------------------------------------------------
5
     Author: Muze ([email protected])
6
     Date: 11 december 2002
7
8
     Copyright 2002 Muze
9
10
     This file is part of Ariadne.
11
12
     Ariadne is free software; you can redistribute it and/or modify
13
     it under the terms of the GNU General Public License as published
14
     by the Free Software Foundation; either version 2 of the License,
15
     or (at your option) any later version.
16
17
     Ariadne is distributed in the hope that it will be useful,
18
     but WITHOUT ANY WARRANTY; without even the implied warranty of
19
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20
     GNU General Public License for more details.
21
22
     You should have received a copy of the GNU General Public License
23
     along with Ariadne; if not, write to the Free Software
24
     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
25
     02111-1307  USA
26
27
    -------------------------------------------------------------------
28
29
     Description:
30
31
	Contains all loader functions for the Ariadne Soap interface.
32
33
    ******************************************************************/
34
35
	$ERRMODE="htmljs"; // alternative: "text"/"html"/"js"
36
37
	require_once($store_config['code']."include/loader.soap.server.php");
38
39
	$DB["method"]["loader"] = false;
40
	$DB["method"]["file"] = true;
41
	$DB["file"] = "/tmp/soap.log";
42
43
	function error($text, $code="Client.Unkown") {
0 ignored issues
show
The function error() has been defined more than once; this definition is ignored, only the first definition in lib/includes/loader.cmd.php (L48-50) is considered.

This check looks for functions that have already been defined in other files.

Some Codebases, like WordPress, make a practice of defining functions multiple times. This may lead to problems with the detection of function parameters and types. If you really need to do this, you can mark the duplicate definition with the @ignore annotation.

/**
 * @ignore
 */
function getUser() {

}

function getUser($id, $realm) {

}

See also the PhpDoc documentation for @ignore.

Loading history...
44
		global $SOAP_Fault;
45
			debug("soap::ldObjectNotFound($requestedpath, $requestedtemplate)", "loader");
0 ignored issues
show
The variable $requestedpath does not exist. Did you forget to declare it?

This check marks access to variables or properties that have not been declared yet. While PHP has no explicit notion of declaring a variable, accessing it before a value is assigned to it is most likely a bug.

Loading history...
The variable $requestedtemplate does not exist. Did you forget to declare it?

This check marks access to variables or properties that have not been declared yet. While PHP has no explicit notion of declaring a variable, accessing it before a value is assigned to it is most likely a bug.

Loading history...
46
			$SOAP_Fault = new soap_fault(
47
							$code,
48
							$text,
49
							"Server could not find $requestedpath::$requestedtemplate");
50
51
		debug("error: '$text'");
52
	}
53
54
55
	function ldCheckLogin($login, $password) {
56
	global $ARLogin, $ARPassword, $store, $AR;
57
		debug("soap::ldCheckLogin($login, [password])");
58
		$criteria = array();
59
		$criteria["object"]["implements"]["="]="puser";
60
		$criteria["login"]["value"]["="]=$login;
61
		$result = $store->call(
62
						"system.authenticate.phtml",
63
						Array(
64
							"ARPassword" => $password
65
						),
66
						$store->find("/system/users/", $criteria)
67
					);
68
69
		if (!count($result)) {
70
			//echo "<script> alert('1'); </script>\n";
71
			$user = current(
72
					$store->call(
73
						"system.authenticate.phtml",
74
						Array(
75
							"ARLogin" => $login,
76
							"ARPassword" => $password
77
						),
78
						$store->get("/system/users/extern/")
79
					));
80
		} else {
81
			$user = current($result);
82
		}
83
84
		if ($user) {
85
//			if ($login !== "public") {
86
//				/* welcome to Ariadne :) */
87
//				ldSetCredentials($login, $password);
88
//			}
89
			$ARLogin = $login;
90
			$ARPassword = 0;
91
			$AR->user = $user;
92
			$result = true;
93
		} else {
94
			debug("ldAuthUser: user('$user') could not authenticate", "all");
95
		}
96
		return $result;
97
	}
98
99
100
	function ldRegisterFile($field = "file", &$error) {
0 ignored issues
show
The function ldRegisterFile() has been defined more than once; this definition is ignored, only the first definition in lib/includes/loader.cmd.php (L52-81) is considered.

This check looks for functions that have already been defined in other files.

Some Codebases, like WordPress, make a practice of defining functions multiple times. This may lead to problems with the detection of function parameters and types. If you really need to do this, you can mark the duplicate definition with the @ignore annotation.

/**
 * @ignore
 */
function getUser() {

}

function getUser($id, $realm) {

}

See also the PhpDoc documentation for @ignore.

Loading history...
101
	global $ARnls, $store, $arguments;
102
		debug("ldRegisterFile([$field], [error])");
103
104
		require_once($store->code."modules/mod_mimemagic.php");
105
106
		$result = Array();
107
		$file_data = $arguments[$field];
108
		if ($file_data) {
109
			$file_data = base64_decode($file_data);
110
			if (!$file_data) {
111
				$error = "could not base64_decode file '$field'";
112
			} else {
113
				$file_temp = tempnam($store->get_config("files")."temp", "upload");
114
				$fp = fopen($file_temp, "wb+");
115 View Code Duplication
				if (!$fp) {
116
					$error = "could not write file '$field'";
117
				} else {
118
					debug("	file_data (".$file_data.")");
119
					fwrite($fp, $file_data, strlen($file_data));
120
					fclose($fp);
121
122
					$file_type = get_mime_type($file_temp);
123
124
					$result[$field] = $field;
125
					$result[$field."_temp"] = substr($file_temp, strlen($store->get_config("files")."temp/"));
126
					$result[$field."_size"] = filesize($file_temp);
127
					$result[$field."_type"] = $file_type;
128
					debug(" http_post_vars (".serialize($result).")");
129
				}
130
			}
131
		}
132
		debug("ldRegisterFile[end] ($result)");
133
		return $result;
134
	}
135
136
137
138
	function ldObjectNotFound($requestedpath, $requestedtemplate) {
0 ignored issues
show
The function ldObjectNotFound() has been defined more than once; this definition is ignored, only the first definition in lib/includes/loader.cmd.php (L157-159) is considered.

This check looks for functions that have already been defined in other files.

Some Codebases, like WordPress, make a practice of defining functions multiple times. This may lead to problems with the detection of function parameters and types. If you really need to do this, you can mark the duplicate definition with the @ignore annotation.

/**
 * @ignore
 */
function getUser() {

}

function getUser($id, $realm) {

}

See also the PhpDoc documentation for @ignore.

Loading history...
139
	global $SOAP_Fault;
140
		debug("soap::ldObjectNotFound($requestedpath, $requestedtemplate)", "loader");
141
		$SOAP_Fault = new soap_fault(
142
						"Client.ObjectNotFound",
143
						"",
144
						"Server could not find $requestedpath::$requestedtemplate");
145
	}
146
147
	function ldAccessDenied($path, $message) {
0 ignored issues
show
The parameter $path is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
The function ldAccessDenied() has been defined more than once; this definition is ignored, only the first definition in lib/includes/loader.cmd.php (L83-88) is considered.

This check looks for functions that have already been defined in other files.

Some Codebases, like WordPress, make a practice of defining functions multiple times. This may lead to problems with the detection of function parameters and types. If you really need to do this, you can mark the duplicate definition with the @ignore annotation.

/**
 * @ignore
 */
function getUser() {

}

function getUser($id, $realm) {

}

See also the PhpDoc documentation for @ignore.

Loading history...
148
	global $SOAP_Fault, $store;
149
150
		$SOAP_Fault = new soap_fault(
151
						"Client.AccessDenied",
152
						"",
153
						$message);
154
	}
155
156 View Code Duplication
	function ldSetRoot($session='', $nls='') {
0 ignored issues
show
This function seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
The function ldSetRoot() has been defined more than once; this definition is ignored, only the first definition in lib/includes/loader.cmd.php (L90-92) is considered.

This check looks for functions that have already been defined in other files.

Some Codebases, like WordPress, make a practice of defining functions multiple times. This may lead to problems with the detection of function parameters and types. If you really need to do this, you can mark the duplicate definition with the @ignore annotation.

/**
 * @ignore
 */
function getUser() {

}

function getUser($id, $realm) {

}

See also the PhpDoc documentation for @ignore.

Loading history...
157
	global $store, $AR, $ARCurrent, $root, $rootoptions;
158
159
		$root=$AR->root;
160
		$rootoptions="";
161
		if ($session) {
162
			$rootoptions.="/-".$session."-";
163
			$ARCurrent->session->id=$session;
164
		}
165
		if ($nls) {
166
			$rootoptions.="/$nls";
167
			$ARCurrent->nls=$nls;
168
		}
169
		$root.=$rootoptions;
170
		if ($store) { // loader.php uses this function before the store is initialized.
171
			$store->root=$root;
172
			$store->rootoptions=$rootoptions;
173
		}
174
	}
175
176
	function ldSetNls($nls) {
0 ignored issues
show
The function ldSetNls() has been defined more than once; this definition is ignored, only the first definition in lib/includes/loader.cmd.php (L94-96) is considered.

This check looks for functions that have already been defined in other files.

Some Codebases, like WordPress, make a practice of defining functions multiple times. This may lead to problems with the detection of function parameters and types. If you really need to do this, you can mark the duplicate definition with the @ignore annotation.

/**
 * @ignore
 */
function getUser() {

}

function getUser($id, $realm) {

}

See also the PhpDoc documentation for @ignore.

Loading history...
177
	global $ARCurrent;
178
179
		$session=$ARCurrent->session->id;
180
		ldSetRoot($session, $nls);
181
	}
182
183
	function ldSetSession($session='') {
0 ignored issues
show
The function ldSetSession() has been defined more than once; this definition is ignored, only the first definition in lib/includes/loader.cmd.php (L98-100) is considered.

This check looks for functions that have already been defined in other files.

Some Codebases, like WordPress, make a practice of defining functions multiple times. This may lead to problems with the detection of function parameters and types. If you really need to do this, you can mark the duplicate definition with the @ignore annotation.

/**
 * @ignore
 */
function getUser() {

}

function getUser($id, $realm) {

}

See also the PhpDoc documentation for @ignore.

Loading history...
184
	global $ARCurrent, $ARLogin, $ARPassword;
185
186
		$nls=$ARCurrent->nls;
187
		ldSetRoot($session, $nls);
188
	}
189
190 View Code Duplication
	function ldStartSession($sessionid='') {
0 ignored issues
show
This function seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
The function ldStartSession() has been defined more than once; this definition is ignored, only the first definition in lib/includes/loader.cmd.php (L102-104) is considered.

This check looks for functions that have already been defined in other files.

Some Codebases, like WordPress, make a practice of defining functions multiple times. This may lead to problems with the detection of function parameters and types. If you really need to do this, you can mark the duplicate definition with the @ignore annotation.

/**
 * @ignore
 */
function getUser() {

}

function getUser($id, $realm) {

}

See also the PhpDoc documentation for @ignore.

Loading history...
191
	global $ARCurrent, $AR, $ariadne;
192
193
		require($ariadne."/configs/sessions.phtml");
194
		$ARCurrent->session=new session($session_config,$sessionid);
0 ignored issues
show
The variable $session_config does not exist. Did you forget to declare it?

This check marks access to variables or properties that have not been declared yet. While PHP has no explicit notion of declaring a variable, accessing it before a value is assigned to it is most likely a bug.

Loading history...
195
		ldSetSession($ARCurrent->session->id);
196
	}
197
198
	function ldSetCache($file, $time, $image, $headers) {
0 ignored issues
show
The parameter $image is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
The parameter $headers is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
The function ldSetCache() has been defined more than once; this definition is ignored, only the first definition in lib/includes/loader.cmd.php (L106-108) is considered.

This check looks for functions that have already been defined in other files.

Some Codebases, like WordPress, make a practice of defining functions multiple times. This may lead to problems with the detection of function parameters and types. If you really need to do this, you can mark the duplicate definition with the @ignore annotation.

/**
 * @ignore
 */
function getUser() {

}

function getUser($id, $realm) {

}

See also the PhpDoc documentation for @ignore.

Loading history...
199
	global $store;
200
201
		debug("ldSetCache($file, $time, [image], [headers])","object");
202
		debug("ldSetCache::not implemented\n");
203
	}
204
205 View Code Duplication
	function ldMkDir($dir) {
0 ignored issues
show
This function seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
206
	global $store;
207
208
		debug("ldMkDir($dir)","object");
209
		$dir=strtok($dir, "/");
210
		$curr=$store->get_config("files");
211
		while ($dir) {
212
			$curr.=$dir."/";
213
			debug("ldMkDir: $curr","all");
214
			@mkdir($curr, 0755);
215
			$dir=strtok("/");
216
		}
217
	}
218
219
	function ldGetCredentials() {
0 ignored issues
show
The function ldGetCredentials() has been defined more than once; this definition is ignored, only the first definition in lib/includes/loader.cmd.php (L124-125) is considered.

This check looks for functions that have already been defined in other files.

Some Codebases, like WordPress, make a practice of defining functions multiple times. This may lead to problems with the detection of function parameters and types. If you really need to do this, you can mark the duplicate definition with the @ignore annotation.

/**
 * @ignore
 */
function getUser() {

}

function getUser($id, $realm) {

}

See also the PhpDoc documentation for @ignore.

Loading history...
220
		return false;
221
	}
222
223
	function ldSetCredentials($login, $password) {
0 ignored issues
show
The function ldSetCredentials() has been defined more than once; this definition is ignored, only the first definition in lib/includes/loader.cmd.php (L127-128) is considered.

This check looks for functions that have already been defined in other files.

Some Codebases, like WordPress, make a practice of defining functions multiple times. This may lead to problems with the detection of function parameters and types. If you really need to do this, you can mark the duplicate definition with the @ignore annotation.

/**
 * @ignore
 */
function getUser() {

}

function getUser($id, $realm) {

}

See also the PhpDoc documentation for @ignore.

Loading history...
224
	global $ARCurrent, $SOAP_SessionID;
225
226
		// Make sure the login is lower case. Because of the
227
		// numerous checks on "admin".
228
		$login = strtolower( $login );
229
230
		debug("ldSetCredentials($login, [password])","object");
231
		$ARCurrent->session->put("ARLogin", $login);
232
		$ARCurrent->session->put("ARPassword", $password, 1);
233
		$SOAP_SessionID = $ARCurrent->session->id.
234
							md5($ARCurrent->session->id.
235
									$login.$password);
236
237
		return $SOAP_SessionID;
238
	}
239
240
	function ldCheckCredentials($login, $password) {
0 ignored issues
show
The parameter $login is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
The parameter $password is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
The function ldCheckCredentials() has been defined more than once; this definition is ignored, only the first definition in lib/includes/loader.cmd.php (L130-131) is considered.

This check looks for functions that have already been defined in other files.

Some Codebases, like WordPress, make a practice of defining functions multiple times. This may lead to problems with the detection of function parameters and types. If you really need to do this, you can mark the duplicate definition with the @ignore annotation.

/**
 * @ignore
 */
function getUser() {

}

function getUser($id, $realm) {

}

See also the PhpDoc documentation for @ignore.

Loading history...
241
	global $ARCurrent, $SOAP_SessionID;
242
		debug("ldCheckCredentials()","object");
243
		$result = false;
244
		if ($ARCurrent->session && $SOAP_SessionID) {
245
			$sessionid = $ARCurrent->session->id;
246
			$md5_hash = $sessionid.md5($sessionid.
247
						$ARCurrent->session->get("ARLogin").
248
						$ARCurrent->session->get("ARPassword",1));
249
			debug("soap:: checking ($md5_hash) against $SOAP_SessionID", "loader");
250
			if ($md5_hash == $SOAP_SessionID) {
251
				$result = true;
252
			}
253
		}
254
		return $result;
255
	}
256
257
	function ldRedirect($uri) {
0 ignored issues
show
The function ldRedirect() has been defined more than once; this definition is ignored, only the first definition in lib/includes/loader.cmd.php (L133-134) is considered.

This check looks for functions that have already been defined in other files.

Some Codebases, like WordPress, make a practice of defining functions multiple times. This may lead to problems with the detection of function parameters and types. If you really need to do this, you can mark the duplicate definition with the @ignore annotation.

/**
 * @ignore
 */
function getUser() {

}

function getUser($id, $realm) {

}

See also the PhpDoc documentation for @ignore.

Loading history...
258
		return ldHeader("Location: $uri");
259
	}
260
261
	function ldHeader($header) {
0 ignored issues
show
The function ldHeader() has been defined more than once; this definition is ignored, only the first definition in lib/includes/loader.cmd.php (L136-137) is considered.

This check looks for functions that have already been defined in other files.

Some Codebases, like WordPress, make a practice of defining functions multiple times. This may lead to problems with the detection of function parameters and types. If you really need to do this, you can mark the duplicate definition with the @ignore annotation.

/**
 * @ignore
 */
function getUser() {

}

function getUser($id, $realm) {

}

See also the PhpDoc documentation for @ignore.

Loading history...
262
	global $ARCurrent;
263
264
		$result=false;
265
		if (!Headers_sent()) {
266
			$result=true;
267
			Header($header);
268
			$ARCurrent->ldHeaders[strtolower($header)]=$header;
269
		} else {
270
			debug("Headers already sent, couldn't send $header","all");
271
		}
272
		return $result;
273
	}
274
275
	function ldSetClientCache($cache_on, $expires=0, $modified=0) {
0 ignored issues
show
The parameter $cache_on is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
The parameter $expires is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
The parameter $modified is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
The function ldSetClientCache() has been defined more than once; this definition is ignored, only the first definition in lib/includes/loader.cmd.php (L139-141) is considered.

This check looks for functions that have already been defined in other files.

Some Codebases, like WordPress, make a practice of defining functions multiple times. This may lead to problems with the detection of function parameters and types. If you really need to do this, you can mark the duplicate definition with the @ignore annotation.

/**
 * @ignore
 */
function getUser() {

}

function getUser($id, $realm) {

}

See also the PhpDoc documentation for @ignore.

Loading history...
276
		global $ARCurrent;
277
		$now=time();
0 ignored issues
show
$now is not used, you could remove the assignment.

This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.

$myVar = 'Value';
$higher = false;

if (rand(1, 6) > 3) {
    $higher = true;
} else {
    $higher = false;
}

Both the $myVar assignment in line 1 and the $higher assignment in line 2 are dead. The first because $myVar is never used and the second because $higher is always overwritten for every possible time line.

Loading history...
278
		$result = true;
279
		return $result;
280
	}
281
282 View Code Duplication
	function ldSetContent($mimetype, $size=0) {
0 ignored issues
show
This function seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
The function ldSetContent() has been defined more than once; this definition is ignored, only the first definition in lib/includes/loader.cmd.php (L143-145) is considered.

This check looks for functions that have already been defined in other files.

Some Codebases, like WordPress, make a practice of defining functions multiple times. This may lead to problems with the detection of function parameters and types. If you really need to do this, you can mark the duplicate definition with the @ignore annotation.

/**
 * @ignore
 */
function getUser() {

}

function getUser($id, $realm) {

}

See also the PhpDoc documentation for @ignore.

Loading history...
283
		$result=ldHeader("Content-type: ".$mimetype);
284
		if ($size) {
285
			$result=ldHeader("Content-Length: ".$size);
286
		}
287
		return $result;
288
	}
289
290
	function ldGetServerVar($server_var) {
0 ignored issues
show
ldGetServerVar uses the super-global variable $_SERVER which is generally not recommended.

Instead of super-globals, we recommend to explicitly inject the dependencies of your class. This makes your code less dependent on global state and it becomes generally more testable:

// Bad
class Router
{
    public function generate($path)
    {
        return $_SERVER['HOST'].$path;
    }
}

// Better
class Router
{
    private $host;

    public function __construct($host)
    {
        $this->host = $host;
    }

    public function generate($path)
    {
        return $this->host.$path;
    }
}

class Controller
{
    public function myAction(Request $request)
    {
        // Instead of
        $page = isset($_GET['page']) ? intval($_GET['page']) : 1;

        // Better (assuming you use the Symfony2 request)
        $page = $request->query->get('page', 1);
    }
}
Loading history...
The function ldGetServerVar() has been defined more than once; this definition is ignored, only the first definition in lib/includes/loader.cmd.php (L147-150) is considered.

This check looks for functions that have already been defined in other files.

Some Codebases, like WordPress, make a practice of defining functions multiple times. This may lead to problems with the detection of function parameters and types. If you really need to do this, you can mark the duplicate definition with the @ignore annotation.

/**
 * @ignore
 */
function getUser() {

}

function getUser($id, $realm) {

}

See also the PhpDoc documentation for @ignore.

Loading history...
291
		return $_SERVER[$server_var];
292
	}
293
294
	function ldGetClientVar($client_var) {
0 ignored issues
show
The parameter $client_var is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
The function ldGetClientVar() has been defined more than once; this definition is ignored, only the first definition in lib/includes/loader.cmd.php (L152-155) is considered.

This check looks for functions that have already been defined in other files.

Some Codebases, like WordPress, make a practice of defining functions multiple times. This may lead to problems with the detection of function parameters and types. If you really need to do this, you can mark the duplicate definition with the @ignore annotation.

/**
 * @ignore
 */
function getUser() {

}

function getUser($id, $realm) {

}

See also the PhpDoc documentation for @ignore.

Loading history...
295
		// dummy function
296
		return false;
297
	}
298
299
	function ldDisablePostProcessing() {
0 ignored issues
show
The function ldDisablePostProcessing() has been defined more than once; this definition is ignored, only the first definition in lib/includes/loader.cmd.php (L181-184) is considered.

This check looks for functions that have already been defined in other files.

Some Codebases, like WordPress, make a practice of defining functions multiple times. This may lead to problems with the detection of function parameters and types. If you really need to do this, you can mark the duplicate definition with the @ignore annotation.

/**
 * @ignore
 */
function getUser() {

}

function getUser($id, $realm) {

}

See also the PhpDoc documentation for @ignore.

Loading history...
300
		// dummy function
301
		return false;
302
	}
303
304
	function ldGetRequestedHost() {
0 ignored issues
show
The function ldGetRequestedHost() has been defined more than once; this definition is ignored, only the first definition in lib/includes/loader.cmd.php (L110-112) is considered.

This check looks for functions that have already been defined in other files.

Some Codebases, like WordPress, make a practice of defining functions multiple times. This may lead to problems with the detection of function parameters and types. If you really need to do this, you can mark the duplicate definition with the @ignore annotation.

/**
 * @ignore
 */
function getUser() {

}

function getUser($id, $realm) {

}

See also the PhpDoc documentation for @ignore.

Loading history...
305
		// dummy function
306
	}
307