File tree 1 file changed +6
-0
lines changed
Resources/phpcr-migrations
1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -88,6 +88,9 @@ private function upgrade(SessionInterface $session): void
88
88
/** @var Row<mixed> $row */
89
89
foreach ($ rows as $ row ) {
90
90
$ node = $ row ->getNode ();
91
+ if (!$ node ->hasProperty ($ templateKey )) {
92
+ continue ;
93
+ }
91
94
$ structureType = $ node ->getPropertyValue ($ templateKey );
92
95
$ routePathPropertyName = $ this ->getRoutePathPropertyName ($ structureType , $ locale );
93
96
@@ -113,6 +116,9 @@ private function downgrade(SessionInterface $session)
113
116
foreach ($ rows as $ row ) {
114
117
$ node = $ row ->getNode ();
115
118
$ propertyName = $ this ->propertyEncoder ->localizedContentName (RoutableSubscriber::ROUTE_FIELD_NAME , $ locale );
119
+ if (!$ node ->hasProperty ($ propertyName )) {
120
+ continue ;
121
+ }
116
122
$ node ->setProperty ($ propertyName , null );
117
123
}
118
124
}
You can’t perform that action at this time.
0 commit comments