From bb7b48d94c2d377bdac67c121eb6d4ad68977afb Mon Sep 17 00:00:00 2001 From: MarkBaker Date: Wed, 28 Oct 2015 00:47:15 +0000 Subject: [PATCH] Fix to MEDIAN() function --- src/PhpSpreadsheet/Calculation/Statistical.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PhpSpreadsheet/Calculation/Statistical.php b/src/PhpSpreadsheet/Calculation/Statistical.php index 3bd14a9d..1df2cb1f 100644 --- a/src/PhpSpreadsheet/Calculation/Statistical.php +++ b/src/PhpSpreadsheet/Calculation/Statistical.php @@ -2329,7 +2329,7 @@ class Statistical if ($mValueCount == floor($mValueCount)) { $returnValue = ($mArgs[$mValueCount--] + $mArgs[$mValueCount]) / 2; } else { - $mValueCount == floor($mValueCount); + $mValueCount = floor($mValueCount); $returnValue = $mArgs[$mValueCount]; } }