File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed
app/Migrations/Schema/V111 Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -656,9 +656,10 @@ public function up(Schema $schema)
656
656
$ tpl = $ em
657
657
->getRepository ('ChamiloCoreBundle:SystemTemplate ' )
658
658
->findOneBy (['title ' => $ title ]);
659
- $ tpl ->setContent ($ content );
660
-
661
- $ em ->merge ($ tpl );
659
+ if (!empty ($ tpl )) {
660
+ $ tpl ->setContent ($ content );
661
+ $ em ->merge ($ tpl );
662
+ }
662
663
}
663
664
664
665
$ em ->flush ();
@@ -1213,11 +1214,12 @@ public function down(Schema $schema)
1213
1214
$ tpl = $ em
1214
1215
->getRepository ('ChamiloCoreBundle:SystemTemplate ' )
1215
1216
->findOneBy (['title ' => $ title ]);
1216
- $ tpl ->setContent ($ content );
1217
-
1218
- $ em ->merge ($ tpl );
1217
+ if (!empty ($ tpl )) {
1218
+ $ tpl ->setContent ($ content );
1219
+ $ em ->merge ($ tpl );
1220
+ }
1219
1221
}
1220
1222
1221
1223
$ em ->flush ();
1222
1224
}
1223
- }
1225
+ }
You can’t perform that action at this time.
0 commit comments