Skip to content

Commit 1f5a333

Browse files
authored
Merge d993616 into 197eedd
2 parents 197eedd + d993616 commit 1f5a333

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

src/Search.php

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,25 @@ class Search
171171
private $endpoints = [];
172172

173173
/**
174-
* Initializes serializer.
174+
* Constructor to initialize static properties
175175
*/
176176
public function __construct()
177+
{
178+
$this->initializeSerializer();
179+
}
180+
181+
/**
182+
* Wakeup method to initialize static properties
183+
*/
184+
public function __wakeup()
185+
{
186+
$this->initializeSerializer();
187+
}
188+
189+
/**
190+
* Initializes the serializer
191+
*/
192+
private function initializeSerializer()
177193
{
178194
if (static::$serializer === null) {
179195
static::$serializer = new OrderedSerializer(

0 commit comments

Comments
 (0)