Skip to content
Permalink
Browse files Browse the repository at this point in the history
Merge pull request from GHSA-q6pr-42v5-v97q
Id must be cast in integer
  • Loading branch information
PierreRambaud committed Apr 15, 2020
2 parents d3bf027 + b918ba8 commit 6838d21
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions classes/controller/AdminController.php
Expand Up @@ -4081,7 +4081,7 @@ protected function processBulkDelete()
$result = true;
foreach ($this->boxes as $id) {
/** @var $to_delete ObjectModel */
$to_delete = new $this->className($id);
$to_delete = new $this->className((int) $id);
$delete_ok = true;
if ($this->deleted) {
$to_delete->deleted = 1;
Expand All @@ -4097,7 +4097,7 @@ protected function processBulkDelete()
if ($delete_ok) {
PrestaShopLogger::addLog(sprintf($this->l('%s deletion', 'AdminTab', false, false), $this->className), 1, null, $this->className, (int) $to_delete->id, true, (int) $this->context->employee->id);
} else {
$this->errors[] = $this->trans('Can\'t delete #%id%', array('%id%' => $id), 'Admin.Notifications.Error');
$this->errors[] = $this->trans('Can\'t delete #%id%', array('%id%' => (int) $id), 'Admin.Notifications.Error');
}
}
if ($result) {
Expand Down

0 comments on commit 6838d21

Please sign in to comment.