Skip to content

Commit a4b6e28

Browse files
committed
[Tree] The value of path source property is cast to string type for Materialized Path Tree strategy
1 parent 8168136 commit a4b6e28

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ a release.
1919
---
2020

2121
## [Unreleased]
22+
### Tree
23+
### Fixed
24+
- The value of path source property is cast to string type for Materialized Path Tree strategy (#2061)
2225

2326
## [2.4.38] - 2019-11-08
2427
### Global / Shared

lib/Gedmo/Tree/Strategy/AbstractMaterializedPath.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ public function updateNode(ObjectManager $om, $node, AdapterInterface $ea)
244244
$pathProp->setAccessible(true);
245245
$pathSourceProp = $meta->getReflectionProperty($config['path_source']);
246246
$pathSourceProp->setAccessible(true);
247-
$path = $pathSourceProp->getValue($node);
247+
$path = (string) $pathSourceProp->getValue($node);
248248

249249
// We need to avoid the presence of the path separator in the path source
250250
if (strpos($path, $config['path_separator']) !== false) {

0 commit comments

Comments
 (0)