From 804b786065b81e0ae4259e3a5042fd68e371d06c Mon Sep 17 00:00:00 2001 From: Mike Colagrosso Date: Wed, 12 Feb 2025 22:25:40 -0700 Subject: [PATCH] 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. --- lib/Ebook.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/Ebook.php b/lib/Ebook.php index d4037136..8de96798 100644 --- a/lib/Ebook.php +++ b/lib/Ebook.php @@ -729,6 +729,10 @@ final class Ebook{ } $this->_IndexableText = Formatter::RemoveDiacriticsAndNonalphanumerics($this->_IndexableText); + + if($this->_IndexableText == ''){ + $this->_IndexableText = null; + } } return $this->_IndexableText;