Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Divsion by zero when using drush search-api-status on empty indexes.
Comment | File | Size | Author |
---|---|---|---|
#1 | 1242614-division-by-zero-drush-search-api-status.patch | 617 bytes | jsacksick |
Comments
Comment #1
jsacksick CreditAttribution: jsacksick commentedCorrected by adding a condition on the
$status['total']
.Comment #2
jsacksick CreditAttribution: jsacksick commentedComment #3
drunken monkeyPatch makes sense, thanks! However, shouldn't we just print "100%" instead of "0"? Or at least "-" to (hopefully) more clearly indicate that this column has no significance for the index in question?
Comment #4
jsacksick CreditAttribution: jsacksick commentedI think we should print a "-" instead, it would be better. It's up to you to choose between 100% and "-" :)
Comment #5
drunken monkeyOK, then let's stick with "-". Committed, thanks!