Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions lib/PHPExcel/Calculation/Functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ public static function isCellValue($idx) {

public static function _ifCondition($condition) {
$condition = PHPExcel_Calculation_Functions::flattenSingleValue($condition);
if (!in_array($condition{0},array('>', '<', '='))) {
if (!in_array($condition[0],array('>', '<', '='))) {
if (!is_numeric($condition)) { $condition = PHPExcel_Calculation::_wrapResult(strtoupper($condition)); }
return '='.$condition;
} else {
Expand Down Expand Up @@ -514,13 +514,11 @@ public static function N($value) {
case 'float' :
case 'integer' :
return $value;
break;
case 'boolean' :
return (integer) $value;
break;
case 'string' :
// Errors
if ((strlen($value) > 0) && ($value{0} == '#')) {
if ((strlen($value) > 0) && ($value[0] == '#')) {
return $value;
}
break;
Expand Down Expand Up @@ -567,7 +565,6 @@ public static function TYPE($value) {
return 4;
} elseif(is_array($value)) {
return 64;
break;
} elseif(is_string($value)) {
// Errors
if ((strlen($value) > 0) && ($value{0} == '#')) {
Expand Down