File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -163,6 +163,6 @@ private function stampCreated(int $lifetime = null): void
163
163
{
164
164
$ timeStamp = time ();
165
165
$ this ->meta [self ::CREATED ] = $ this ->meta [self ::UPDATED ] = $ this ->lastUsed = $ timeStamp ;
166
- $ this ->meta [self ::LIFETIME ] = $ lifetime ?? ini_get ('session.cookie_lifetime ' );
166
+ $ this ->meta [self ::LIFETIME ] = $ lifetime ?? ( int ) ini_get ('session.cookie_lifetime ' );
167
167
}
168
168
}
Original file line number Diff line number Diff line change @@ -136,4 +136,14 @@ public function testDoesNotSkipLastUsedUpdate()
136
136
137
137
$ this ->assertEquals ($ timeStamp , $ sessionMetadata [MetadataBag::UPDATED ]);
138
138
}
139
+
140
+ public function testLifetimeIsInt ()
141
+ {
142
+ $ sessionMetadata = [];
143
+
144
+ $ bag = new MetadataBag ();
145
+ $ bag ->initialize ($ sessionMetadata );
146
+
147
+ $ this ->assertIsInt ($ bag ->getLifetime ());
148
+ }
139
149
}
You can’t perform that action at this time.
0 commit comments