Skip to content
This repository has been archived by the owner on Nov 4, 2020. It is now read-only.

Commit

Permalink
Fixed error on product duplication
Browse files Browse the repository at this point in the history
Fix for:
When try to Save & Duplicate product get this error
Notice: Undefined index: qty in /vendor/kiwicommerce/module-admin-activity/Helper/TrackField.php on line 661
  • Loading branch information
magefan committed Oct 6, 2018
1 parent df51892 commit f9300ad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Helper/TrackField.php
Expand Up @@ -658,7 +658,7 @@ public function getWildCardData($model, $method)
if ($method == self::PRODUCT_METHOD) {
$newQty = $model->getData('stock_data');
$oldQty = $model->getOrigData('quantity_and_stock_status');
if ($newQty['qty'] != $oldQty['qty']) {
if (isset($newQty['qty']) && isset($oldQty['qty']) && $newQty['qty'] != $oldQty['qty']) {
$logData['qty'] = [
'old_value' => $oldQty['qty'],
'new_value' => $newQty['qty']
Expand Down

0 comments on commit f9300ad

Please sign in to comment.