<li><p><strong>Database:</strong> Fixed a bug where <code class="docutils literal notranslate"><span class="pre">when()</span></code> and <code class="docutils literal notranslate"><span class="pre">whenNot()</span></code> in <code class="docutils literal notranslate"><span class="pre">ConditionalTrait</span></code> incorrectly evaluated certain falsy values (such as <code class="docutils literal notranslate"><span class="pre">[]</span></code>, <code class="docutils literal notranslate"><span class="pre">0</span></code>, <code class="docutils literal notranslate"><span class="pre">0.0</span></code>, and <code class="docutils literal notranslate"><span class="pre">'0'</span></code>) as truthy, causing callbacks to be executed unexpectedly. These methods now cast the condition to a boolean using <code class="docutils literal notranslate"><span class="pre">(bool)</span></code> to ensure consistent behavior with PHP’s native truthiness.</p></li>
0 commit comments