From 2cffe106b895e08f25b576e8b30226465ac69a37 Mon Sep 17 00:00:00 2001 From: Ariel Ponce Date: Fri, 6 Mar 2015 11:51:05 +0100 Subject: [PATCH] Allow to pass 0 as column value in List widgets **Problem**: When overriden the columns value, if we pass 0 or '0', the condition is not met and therefore the column has a null value. **Solution**: Check for not null in the condtion --- modules/backend/widgets/Lists.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/backend/widgets/Lists.php b/modules/backend/widgets/Lists.php index a43f9eaa7..a35dadc4f 100644 --- a/modules/backend/widgets/Lists.php +++ b/modules/backend/widgets/Lists.php @@ -763,11 +763,11 @@ class Lists extends WidgetBase /* * Extensibility */ - if ($response = Event::fire('backend.list.overrideColumnValue', [$this, $record, $column, $value], true)) { + if (!is_null($response = Event::fire('backend.list.overrideColumnValue', [$this, $record, $column, $value], true))) { $value = $response; } - if ($response = $this->fireEvent('list.overrideColumnValue', [$record, $column, $value], true)) { + if (!is_null($response = $this->fireEvent('list.overrideColumnValue', [$record, $column, $value], true))) { $value = $response; }