Skip to content

Commit

Permalink
[#431] Fix warnings in area-related services.
Browse files Browse the repository at this point in the history
Fixes:
* Undefined variable: string
* Undefined index: sid
  • Loading branch information
jaragunde committed Feb 7, 2022
1 parent af48580 commit bc8dbff
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 10 deletions.
4 changes: 1 addition & 3 deletions web/services/createAreasService.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,7 @@

}



if (!$string)
if (!isset($string))
{

$string = "<return service='createAreas'><ok>Operation Success!</ok><areas>";
Expand Down
4 changes: 1 addition & 3 deletions web/services/deleteAreasService.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,7 @@

}



if (!$string)
if (!isset($string))
$string = "<return service='deleteAreas'><ok>Operation Success!</ok></return>";

} while (false);
Expand Down
2 changes: 1 addition & 1 deletion web/services/getAllAreasService.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
include_once(PHPREPORT_ROOT . '/model/facade/AdminFacade.php');
include_once(PHPREPORT_ROOT . '/model/vo/AreaVO.php');

$sid = $_GET['sid'];
$sid = $_GET['sid'] ?? NULL;

do {
/* We check authentication and authorization */
Expand Down
4 changes: 1 addition & 3 deletions web/services/updateAreasService.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,7 @@

}



if (!$string)
if (!isset($string))
{

$string = "<return service='updateAreas'><ok>Operation Success!</ok><areas>";
Expand Down

0 comments on commit bc8dbff

Please sign in to comment.