File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,10 @@ public function __construct(...$values)
28
28
\E_USER_DEPRECATED
29
29
);
30
30
31
+ if (!$ values ) {
32
+ throw new \InvalidArgumentException (sprintf ('The %s attribute needs at least one criterion ' , __CLASS__ ));
33
+ }
34
+
31
35
$ this ->lastmodHelper = new LastmodHelper ();
32
36
33
37
foreach ($ values as $ key => $ value ) {
Original file line number Diff line number Diff line change @@ -109,7 +109,7 @@ protected function findAttribute($callback): ?Attribute\Send304IfNotModified
109
109
$ attributes = $ method ->getAttributes (\Webfactory \Bundle \WfdMetaBundle \Caching \Attribute \Send304IfNotModified::class);
110
110
111
111
if ($ attributes ) {
112
- return $ attributes [0 ];
112
+ return $ attributes [0 ]-> newInstance () ;
113
113
}
114
114
}
115
115
You can’t perform that action at this time.
0 commit comments