We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 52b2b26 commit 22c2ceeCopy full SHA for 22c2cee
src/Illuminate/Queue/SerializesModels.php
@@ -71,6 +71,12 @@ public function __serialize()
71
continue;
72
}
73
74
+ $value = $this->getPropertyValue($property);
75
+
76
+ if ($property->hasDefaultValue() && $value === $property->getDefaultValue()) {
77
+ continue;
78
+ }
79
80
$name = $property->getName();
81
82
if ($property->isPrivate()) {
@@ -79,9 +85,7 @@ public function __serialize()
85
$name = "\0*\0{$name}";
86
87
- $values[$name] = $this->getSerializedPropertyValue(
83
- $this->getPropertyValue($property)
84
- );
88
+ $values[$name] = $this->getSerializedPropertyValue($value);
89
90
91
return $values;
0 commit comments