Skip to content

Commit

Permalink
Cast input to int early
Browse files Browse the repository at this point in the history
  • Loading branch information
AJenbo committed Jan 15, 2024
1 parent 1bc106f commit d991a67
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion upload/admin/controller/marketplace/modification.php
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ public function refresh(): void {
$modification[$key] = implode("\n", $lines);
} else {
$search = trim($operation->getElementsByTagName('search')->item(0)->textContent);
$limit = $operation->getElementsByTagName('search')->item(0)->getAttribute('limit');
$limit = (int)$operation->getElementsByTagName('search')->item(0)->getAttribute('limit');
$replace = trim($operation->getElementsByTagName('add')->item(0)->textContent);

// Limit
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public function index(): string {
$parts = [];
}

$category_id = end($parts);
$category_id = (int)end($parts);

$this->load->model('catalog/category');

Expand Down

0 comments on commit d991a67

Please sign in to comment.