File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -1087,13 +1087,16 @@ protected function getGlobalState($forClass = NULL): array
10871087 }
10881088
10891089 $ components = $ this ->getReflection ()->getPersistentComponents ();
1090- $ iterator = $ this ->getComponents (TRUE , IStatePersistent::class );
1090+ $ iterator = $ this ->getComponents (TRUE );
10911091
10921092 foreach ($ iterator as $ name => $ component ) {
10931093 if ($ iterator ->getDepth () === 0 ) {
10941094 // counts with Nette\Application\RecursiveIteratorIterator::SELF_FIRST
10951095 $ since = $ components [$ name ]['since ' ] ?? FALSE ; // FALSE = nonpersistent
10961096 }
1097+ if (!$ component instanceof IStatePersistent) {
1098+ continue ;
1099+ }
10971100 $ prefix = $ component ->getUniqueId () . self ::NAME_SEPARATOR ;
10981101 $ params = [];
10991102 $ component ->saveState ($ params );
You can’t perform that action at this time.
0 commit comments