From 7966c405641d14bd64fe78256926f596f599b640 Mon Sep 17 00:00:00 2001 From: Fran Garcia-Linares Date: Fri, 4 May 2018 11:41:32 +0100 Subject: [PATCH 1/2] Fixes typo. --- src/ExpressionHelper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ExpressionHelper.php b/src/ExpressionHelper.php index 01ef710..41fbf2e 100644 --- a/src/ExpressionHelper.php +++ b/src/ExpressionHelper.php @@ -53,7 +53,7 @@ public function getFieldExpressions($entityTypeId) { // We're hardcoding this here as the API does not expose this. $sqlColumn = "{$fieldName}_{$column}"; // @todo Better use field storage definitions. - $sqlValue = (is_int($value) || is_float($value)) ? (string) $value : "'$value"; + $sqlValue = (is_int($value) || is_float($value)) ? (string) $value : "$value"; // Revision table expressons get silently ignored if not applicable. $sqlTables = ["{$entityTypeId}__{$fieldName}", "{$entityTypeId}_revision__{$fieldName}"]; foreach ($sqlTables as $sqlTable) { From dfe17fd726452a5ba2bc7ea66bf5c34a07dc2a49 Mon Sep 17 00:00:00 2001 From: Fran Garcia-Linares Date: Fri, 1 Jun 2018 09:37:46 +0100 Subject: [PATCH 2/2] Added quotes on both sides. --- src/ExpressionHelper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ExpressionHelper.php b/src/ExpressionHelper.php index 41fbf2e..acbf57b 100644 --- a/src/ExpressionHelper.php +++ b/src/ExpressionHelper.php @@ -53,7 +53,7 @@ public function getFieldExpressions($entityTypeId) { // We're hardcoding this here as the API does not expose this. $sqlColumn = "{$fieldName}_{$column}"; // @todo Better use field storage definitions. - $sqlValue = (is_int($value) || is_float($value)) ? (string) $value : "$value"; + $sqlValue = (is_int($value) || is_float($value)) ? (string) $value : "'$value'"; // Revision table expressons get silently ignored if not applicable. $sqlTables = ["{$entityTypeId}__{$fieldName}", "{$entityTypeId}_revision__{$fieldName}"]; foreach ($sqlTables as $sqlTable) {