File tree Expand file tree Collapse file tree 1 file changed +16
-12
lines changed Expand file tree Collapse file tree 1 file changed +16
-12
lines changed Original file line number Diff line number Diff line change 1919class Zendesk_Zendesk_Block_Adminhtml_Dashboard_Tab_Tickets_Grid_Renderer_Email extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract {
2020
2121 public function render (Varien_Object $ row ) {
22- $ users = Mage::registry ('zendesk_users ' ) ? Mage:: registry ( ' zendesk_users ' ) : array () ;
22+ $ users = Mage::registry ('zendesk_users ' );
2323 $ value = (int ) $ row ->getData ($ this ->getColumn ()->getIndex ());
24-
25- $ found = array_filter ($ users , function ($ user ) use ($ value ) {
26- return (int ) $ user ['id ' ] === $ value ;
27- });
28-
29- if ( count ($ found ) ) {
24+
25+ if ($ users ) {
26+ $ found = array_filter ($ users , function ($ user ) use ($ value ) {
27+ return (int ) $ user ['id ' ] === $ value ;
28+ });
29+ } else {
30+ return '' ;
31+ }
32+
33+ if ( count ($ found ) ) {
3034 $ user = array_shift ($ found );
31-
35+
3236 return $ user ['email ' ];
33- }
34-
35- return '' ;
36- }
37+ }
38+
39+ return '' ;
40+ }
3741
3842}
You can’t perform that action at this time.
0 commit comments