Keep IndexableText null if it's an empty string

The `Validate()` method is correctly setting it to null, but then the
`UPDATE` SQL statement is triggering another call to
`GetIndexableText()`. Without this change, empty strings are being
written to the `IndexableText` column.
This commit is contained in:
Mike Colagrosso 2025-02-12 22:25:40 -07:00 committed by Alex Cabal
parent 55e0428006
commit 804b786065

View file

@ -729,6 +729,10 @@ final class Ebook{
} }
$this->_IndexableText = Formatter::RemoveDiacriticsAndNonalphanumerics($this->_IndexableText); $this->_IndexableText = Formatter::RemoveDiacriticsAndNonalphanumerics($this->_IndexableText);
if($this->_IndexableText == ''){
$this->_IndexableText = null;
}
} }
return $this->_IndexableText; return $this->_IndexableText;