l10n_update_update_7207() throws a warning when there are no plural source strings because l10n_update_get_d8_plural_strings() returns FALSE and count() expects an array.
I'm wondering if there is also a problem with the query, because my database should not return no results.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | l10n_update--update-7207--3232972-2.patch | 800 bytes | douggreen |
Comments
Comment #2
douggreen commentedpatch attached
Comment #3
gábor hojtsyHm, interesting find. Does that match the expectation of the API elsewhere though?
Comment #4
pfrenssenAnswering #3: the function is called twice: in
l10n_update_d8_plural_conversion()andl10n_update_update_7207(). Both uses are compatible with the new function return value. None of them were checking explicitly for a FALSE value.I don't think there is a problem with the query. In my site the
locales_sourcetable contained 13k rows, but apparently none with aL10N_UPDATE_PLURAL_DELIMITER. I used the following query to check:Patch fixes the problem and updates documentation to match the new API. Looking good to me.
Comment #6
sutharsan commentedI agree that there is no harm in changing the return value signature for the current usage. Although their is no BC policy for Drupal 7, I consulted the D8/9 policy, and as the function is defined in an .install file, it should be consider as internal.
Thanks to all. Patch is now committed, new release to follow.