We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5f520f3 commit 8fad785Copy full SHA for 8fad785
1 file changed
src/Illuminate/Queue/SerializesModels.php
@@ -24,9 +24,9 @@ public function __sleep()
24
));
25
}
26
27
- return array_map(function ($p) {
28
- return $p->getName();
29
- }, $properties);
+ return array_filter(array_map(function ($p) {
+ return $p->isStatic() ? null : $p->getName();
+ }, $properties));
30
31
32
/**
@@ -37,6 +37,10 @@ public function __sleep()
37
public function __wakeup()
38
{
39
foreach ((new ReflectionClass($this))->getProperties() as $property) {
40
+ if ($property->isStatic()) {
41
+ continue;
42
+ }
43
+
44
$property->setValue($this, $this->getRestoredPropertyValue(
45
$this->getPropertyValue($property)
46
0 commit comments