From d16bc107add18ad24253de363d56273557cecf7c Mon Sep 17 00:00:00 2001 From: Paul Weidner Date: Thu, 30 Nov 2023 09:14:47 -0800 Subject: [PATCH] Use strict identical operator when checking geometry format #756 --- CHANGELOG.md | 1 + .../core/geo/src/Normalizer/ContentEntityGeometryNormalizer.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3becd6fd0..bdcd194c3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - [Correct alter hook to add password grant to static scopes #755](https://github.com/farmOS/farmOS/pull/755) +- [Use strict identical operator when checking geometry format #756](https://github.com/farmOS/farmOS/pull/756) ## [3.0.0-beta3] 2023-11-27 diff --git a/modules/core/geo/src/Normalizer/ContentEntityGeometryNormalizer.php b/modules/core/geo/src/Normalizer/ContentEntityGeometryNormalizer.php index 4fa873a01..89f64d571 100644 --- a/modules/core/geo/src/Normalizer/ContentEntityGeometryNormalizer.php +++ b/modules/core/geo/src/Normalizer/ContentEntityGeometryNormalizer.php @@ -104,7 +104,7 @@ class ContentEntityGeometryNormalizer implements NormalizerInterface, Serializer // Check that the data is a content entity. // Only formats that are prefixed with "geometry_" are supported. // This makes it easier for other modules to provide geometry encoders. - return $data instanceof ContentEntityInterface && strpos($format, 'geometry_') == 0; + return $data instanceof ContentEntityInterface && strpos($format, 'geometry_') === 0; } /**