Skip to content

Commit

Permalink
PHP 8: Fix cannot remove category on admin product edit categories tab (
Browse files Browse the repository at this point in the history
  • Loading branch information
iamniels authored Jun 9, 2022
1 parent 554a2b6 commit 3005c60
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,8 @@ function categoryAdd(id) {
}
function categoryRemove(id) {
var ids = $('product_categories').value.split(',');
// bug #7654 fixed
while (-1 != ids.indexOf(id)) {
ids.splice(ids.indexOf(id), 1);
while (-1 != ids.indexOf(id.toString())) {
ids.splice(ids.indexOf(id.toString()), 1);
}
$('product_categories').value = ids.join(',');
}
Expand Down

0 comments on commit 3005c60

Please sign in to comment.