We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 717b703 + 6e4fdd9 commit 6b5a3dbCopy full SHA for 6b5a3db
2 files changed
src/Phaseolies/Database/Entity/Model.php
@@ -502,10 +502,6 @@ protected function sanitize($value)
502
{
503
if (is_string($value)) {
504
$value = trim($value);
505
-
506
- if ($value === '') {
507
- $value = null;
508
- }
509
}
510
511
return $value;
tests/Model/ModelTest.php
@@ -93,7 +93,7 @@ public function testAttributeMutation()
93
94
// Test empty string becomes null
95
$model->email = ' ';
96
- $this->assertNull($model->email);
+ $this->assertNotNull($model->email);
97
98
99
public function testMassAssignment()
0 commit comments