Skip to content

Commit b7f2386

Browse files
aamantkiatng
andauthored
Fix error in column renderer when value is empty and not null (#4601)
* fix error in column renderer when valud is empty and not null * test if operand is numeric --------- Co-authored-by: Ng Kiat Siong <kiatsiong.ng@gmail.com>
1 parent f48b6c0 commit b7f2386

File tree

1 file changed

+1
-1
lines changed
  • app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer

1 file changed

+1
-1
lines changed

app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Number.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Number extends Mage_Admin
3232
protected function _getValue(Varien_Object $row)
3333
{
3434
$data = parent::_getValue($row);
35-
if (!is_null($data)) {
35+
if (is_numeric($data)) {
3636
$value = $data * 1;
3737
$sign = (bool) (int) $this->getColumn()->getShowNumberSign() && ($value > 0) ? '+' : '';
3838
if ($sign) {

0 commit comments

Comments
 (0)