Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
GLPI
glpi
Commits
6c9de9e0
Commit
6c9de9e0
authored
Jul 12, 2019
by
Thierry Bugier
Committed by
Johan Cwiklinski
Jul 15, 2019
Browse files
fix inconsistency in method signature
argument names and default values not matching signatures in inherited classes
parent
1cb79faa
Changes
3
Hide whitespace changes
Inline
Side-by-side
inc/api.class.php
View file @
6c9de9e0
...
...
@@ -68,13 +68,15 @@ abstract class API extends CommonGLPI {
/**
* Generic messages
*
* @since 9.1
*
* @param mixed $response string message or array of data to send
* @param integer $code
http code
* @param integer $
http
code http
code (see : https://en.wikipedia.org/wiki/List_of_HTTP_status_
code
s)
* @param array $additionalheaders headers to send with http response (must be an array(key => value))
*
* @return void
*/
abstract
protected
function
returnResponse
(
$response
,
$
code
,
$additionalheaders
);
abstract
protected
function
returnResponse
(
$response
,
$
httpcode
=
200
,
$additionalheaders
=
[]
);
/**
* Upload and validate files from request and append to $this->parameters['input']
...
...
inc/apirest.class.php
View file @
6c9de9e0
...
...
@@ -521,16 +521,6 @@ class APIRest extends API {
}
/**
* Generic function to send a message and an http code to client
*
* @param string $response message or array of data to send
* @param integer $httpcode http code (default 200)
* (see: https://en.wikipedia.org/wiki/List_of_HTTP_status_codes)
* @param array $additionalheaders headers to send with http response (must be an array(key => value))
*
* @return void
*/
public
function
returnResponse
(
$response
,
$httpcode
=
200
,
$additionalheaders
=
[])
{
if
(
empty
(
$httpcode
))
{
...
...
inc/apixmlrpc.class.php
View file @
6c9de9e0
...
...
@@ -285,17 +285,7 @@ class APIXmlrpc extends API {
return
$resource
;
}
/**
* Generic function to send a message and an http code to client
*
* @since 9.1
*
* @param mixed $response string message or array of data to send
* @param integer $httpcode http code (see : https://en.wikipedia.org/wiki/List_of_HTTP_status_codes)
* @param array $additionalheaders headers to send with http response (must be an array(key => value))
*
* @return void
*/
protected
function
returnResponse
(
$response
,
$httpcode
=
200
,
$additionalheaders
=
[])
{
if
(
empty
(
$httpcode
))
{
$httpcode
=
200
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment