@@ -508,7 +508,7 @@ private function readProperty($zval, $property)
508
508
*/
509
509
private function getReadAccessInfo ($ class , $ property )
510
510
{
511
- $ key = ( false !== strpos ( $ class , '@ ' ) ? rawurlencode ($ class ) : $ class ). ' .. ' . $ property ;
511
+ $ key = false !== strpbrk ( $ key = $ class. ' .. ' . $ property , '{}()/@: ' ) ? rawurlencode ($ key ) : $ key ;
512
512
513
513
if (isset ($ this ->readPropertyCache [$ key ])) {
514
514
return $ this ->readPropertyCache [$ key ];
@@ -687,7 +687,7 @@ private function writeCollection($zval, $property, $collection, $addMethod, $rem
687
687
*/
688
688
private function getWriteAccessInfo ($ class , $ property , $ value )
689
689
{
690
- $ key = ( false !== strpos ( $ class , '@ ' ) ? rawurlencode ($ class ) : $ class ). ' .. ' . $ property ;
690
+ $ key = false !== strpbrk ( $ key = $ class. ' .. ' . $ property , '{}()/@: ' ) ? rawurlencode ($ key ) : $ key ;
691
691
692
692
if (isset ($ this ->writePropertyCache [$ key ])) {
693
693
return $ this ->writePropertyCache [$ key ];
@@ -868,7 +868,8 @@ private function getPropertyPath($propertyPath)
868
868
}
869
869
870
870
if ($ this ->cacheItemPool ) {
871
- $ item = $ this ->cacheItemPool ->getItem (self ::CACHE_PREFIX_PROPERTY_PATH .$ propertyPath );
871
+ $ key = false !== strpbrk ($ propertyPath , '{}()/@: ' ) ? rawurlencode ($ propertyPath ) : $ propertyPath ;
872
+ $ item = $ this ->cacheItemPool ->getItem (self ::CACHE_PREFIX_PROPERTY_PATH .str_replace ('\\' , '. ' , $ key ));
872
873
if ($ item ->isHit ()) {
873
874
return $ this ->propertyPathCache [$ propertyPath ] = $ item ->get ();
874
875
}
0 commit comments