From 39be46643bb541f1d56c47a1d11a0463000fdf5b Mon Sep 17 00:00:00 2001 From: Nicholas Miller Date: Fri, 18 Aug 2017 05:52:56 +0300 Subject: [PATCH] fixed notice when remove column from grid --- app/code/Magento/Backend/Block/Widget/Grid/Extended.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Extended.php b/app/code/Magento/Backend/Block/Widget/Grid/Extended.php index a6ff4dc24b4ef..a8d79011dd360 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Extended.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Extended.php @@ -314,7 +314,8 @@ public function removeColumn($columnId) if ($this->getColumnSet()->getChildBlock($columnId)) { $this->getColumnSet()->unsetChild($columnId); if ($this->_lastColumnId == $columnId) { - $this->_lastColumnId = array_pop($this->getColumnSet()->getChildNames()); + $names = $this->getColumnSet()->getChildNames(); + $this->_lastColumnId = array_pop($names); } } return $this;