Skip to content

Commit

Permalink
Merge pull request opencart#13574 from AJenbo/id-int
Browse files Browse the repository at this point in the history
Cast strings to int after extracting the ID from a string
  • Loading branch information
danielkerr authored Jan 17, 2024
2 parents 249eab3 + b0bde14 commit 64226a7
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion upload/admin/controller/design/layout.php
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ public function form(): void {
'edit' => $this->url->link('extension/' . $part[0] . '/module/' . $part[1], 'user_token=' . $this->session->data['user_token'])
];
} else {
$module_info = $this->model_setting_module->getModule($part[2]);
$module_info = $this->model_setting_module->getModule((int)$part[2]);

if ($module_info) {
$data['layout_modules'][] = [
Expand Down
2 changes: 1 addition & 1 deletion upload/catalog/controller/common/column_left.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public function index(): string {
}

if (isset($part[2])) {
$setting_info = $this->model_setting_module->getModule($part[2]);
$setting_info = $this->model_setting_module->getModule((int)$part[2]);

if ($setting_info && $setting_info['status']) {
$output = $this->load->controller('extension/' . $part[0] . '/module/' . $part[1], $setting_info);
Expand Down
2 changes: 1 addition & 1 deletion upload/catalog/controller/common/column_right.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public function index(): string {
}

if (isset($part[2])) {
$setting_info = $this->model_setting_module->getModule($part[2]);
$setting_info = $this->model_setting_module->getModule((int)$part[2]);

if ($setting_info && $setting_info['status']) {
$output = $this->load->controller('extension/' . $part[0] . '/module/' . $part[1], $setting_info);
Expand Down
2 changes: 1 addition & 1 deletion upload/catalog/controller/common/content_bottom.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public function index(): string {
}

if (isset($part[2])) {
$setting_info = $this->model_setting_module->getModule($part[2]);
$setting_info = $this->model_setting_module->getModule((int)$part[2]);

if ($setting_info && $setting_info['status']) {
$output = $this->load->controller('extension/' . $part[0] . '/module/' . $part[1], $setting_info);
Expand Down
2 changes: 1 addition & 1 deletion upload/catalog/controller/common/content_top.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public function index(): string {
}

if (isset($part[2])) {
$setting_info = $this->model_setting_module->getModule($part[2]);
$setting_info = $this->model_setting_module->getModule((int)$part[2]);

if ($setting_info && $setting_info['status']) {
$output = $this->load->controller('extension/' . $part[0] . '/module/' . $part[1], $setting_info);
Expand Down
2 changes: 1 addition & 1 deletion upload/catalog/controller/product/category.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public function index(): ?\Opencart\System\Engine\Action {
$path .= '_' . (int)$path_id;
}

$parent_info = $this->model_catalog_category->getCategory($path_id);
$parent_info = $this->model_catalog_category->getCategory((int)$path_id);

if ($parent_info) {
$data['breadcrumbs'][] = [
Expand Down
2 changes: 1 addition & 1 deletion upload/catalog/controller/product/product.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public function index(): ?\Opencart\System\Engine\Action {
$path .= '_' . $path_id;
}

$category_info = $this->model_catalog_category->getCategory($path_id);
$category_info = $this->model_catalog_category->getCategory((int)$path_id);

if ($category_info) {
$data['breadcrumbs'][] = [
Expand Down

0 comments on commit 64226a7

Please sign in to comment.