@@ -30,12 +30,12 @@ public static function fromContext(CookieJar $jar, BrowserContextInterface $cont
3030 foreach ($ context ->cookies () as $ c ) {
3131 $ jar ->set (new Cookie (
3232 name: (string ) $ c ['name ' ],
33- value: (string ) ( $ c ['value ' ] ?? '' ) ,
34- expires: isset ( $ c ['expires ' ]) ? ( int ) $ c [ ' expires ' ] : null ,
35- path: (string ) ( $ c ['path ' ] ?? ' / ' ) ,
36- domain: (string ) ( $ c ['domain ' ] ?? '' ) ,
37- secure: (bool ) ( $ c ['secure ' ] ?? false ) ,
38- httponly: (bool ) ( $ c ['httpOnly ' ] ?? false ) ,
33+ value: (string ) $ c ['value ' ],
34+ expires: $ c ['expires ' ],
35+ path: (string ) $ c ['path ' ],
36+ domain: (string ) $ c ['domain ' ],
37+ secure: (bool ) $ c ['secure ' ],
38+ httponly: (bool ) $ c ['httpOnly ' ],
3939 ));
4040 }
4141 }
@@ -45,12 +45,12 @@ public static function toJarFromUrl(CookieJar $jar, BrowserContextInterface $con
4545 foreach ($ context ->cookies ([$ url ]) as $ c ) {
4646 $ jar ->set (new Cookie (
4747 name: (string ) $ c ['name ' ],
48- value: (string ) ( $ c ['value ' ] ?? '' ) ,
49- expires: isset ( $ c ['expires ' ]) ? ( int ) $ c [ ' expires ' ] : null ,
50- path: (string ) ( $ c ['path ' ] ?? ' / ' ) ,
51- domain: (string ) ( $ c ['domain ' ] ?? '' ) ,
52- secure: (bool ) ( $ c ['secure ' ] ?? false ) ,
53- httponly: (bool ) ( $ c ['httpOnly ' ] ?? false ) ,
48+ value: (string ) $ c ['value ' ],
49+ expires: $ c ['expires ' ],
50+ path: (string ) $ c ['path ' ],
51+ domain: (string ) $ c ['domain ' ],
52+ secure: (bool ) $ c ['secure ' ],
53+ httponly: (bool ) $ c ['httpOnly ' ],
5454 ));
5555 }
5656 }
0 commit comments