Skip to content

Commit

Permalink
fix(ApiController::setTriple): be carefull to use right varname
Browse files Browse the repository at this point in the history
  • Loading branch information
J9rem committed Sep 7, 2023
1 parent 368db49 commit 87974b3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions includes/controllers/ApiController.php
Original file line number Diff line number Diff line change
Expand Up @@ -685,9 +685,9 @@ public function setTriple($resource)
if (empty($username)) {
$username = $this->getService(AuthController::class)->getLoggedUser()['name'];
}
$rawValue = $_POST['value'] ?? [];
if (is_array($rawValue)) {
$rawValue = array_filter($rawValue, function ($elem) {
$value = $_POST['value'] ?? [];
if (is_array($value)) {
$rawValue = array_filter($value, function ($elem) {
return is_scalar($elem);
});
} elseif (is_scalar($value)) {
Expand Down

0 comments on commit 87974b3

Please sign in to comment.