diff --git a/app/code/community/Inchoo/PHP7/Model/Wishlist/Observer.php b/app/code/community/Inchoo/PHP7/Model/Wishlist/Observer.php new file mode 100644 index 0000000..43e330d --- /dev/null +++ b/app/code/community/Inchoo/PHP7/Model/Wishlist/Observer.php @@ -0,0 +1,24 @@ +getWishlistPendingUrls(); + if (!is_array($urls) && !($urls instanceof Countable) && !$urls) $session->setWishlistPendingUrls([]); + + $wishlistIds = $session->getWishlistIds(); + if (!is_array($wishlistIds) && !($wishlistIds instanceof Countable) && !$wishlistIds) $session->setWishlistIds([]); + + return parent::processAddToCart($observer); + } +} \ No newline at end of file diff --git a/app/code/community/Inchoo/PHP7/etc/config.xml b/app/code/community/Inchoo/PHP7/etc/config.xml index f20cadc..6717f8b 100644 --- a/app/code/community/Inchoo/PHP7/etc/config.xml +++ b/app/code/community/Inchoo/PHP7/etc/config.xml @@ -17,6 +17,14 @@ + + + + Inchoo_PHP7_Model_Wishlist_Observer + + + +