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.
Because in destruct() there is a foreach which triggers
Invalid argument supplied for foreach()
patch coming
Comment | File | Size | Author |
---|---|---|---|
#14 | drupal-locale-2018409-14.patch | 3.05 KB | ParisLiakos |
#10 | drupal-locale-2018409-10.patch | 3.47 KB | ParisLiakos |
#10 | interdiff.txt | 821 bytes | ParisLiakos |
#7 | interdiff.txt | 1.3 KB | ParisLiakos |
#6 | drupal-locale-2018409-6.patch | 3.47 KB | ParisLiakos |
Comments
Comment #1
ParisLiakos CreditAttribution: ParisLiakos commentedComment #3
ParisLiakos CreditAttribution: ParisLiakos commentedok, there is a webtest with the same name...so, lets move it to the
StringTranslation\Translator
namespace that core uses to be consistent and avoid namespace collision with webtestComment #4
dawehner+1 for moving the file.
You could document the type of this variable.
and @inheritdoc
Can't we test what actually was done? For example assertAttributeEmpty?
Comment #5
Berdir@dawehner: Nothing was done, as expected. To add more tests to actually let it do something, we first need the refactoring that's happening in the cache collector issue, which will allow to inject and mock all dependencies properly. So wondering if we want to get that in first and then add more tests here, or just get it in like this and extend later.
Raising to major, this is logging a php warning to watchdog for every request you make when locale is enabled and you're using english/system language.
Comment #6
ParisLiakos CreditAttribution: ParisLiakos commentedyeah, we cant properly unit-test this now..its just as quick fix for the notice.
here is with improvements
Comment #7
ParisLiakos CreditAttribution: ParisLiakos commentedforgot the interdiff
Comment #8
Gábor HojtsyIs the move to this new place arbitrary or is there any rule that this would be placed here? Seems like arbitrary based on the services association taking whatever location desired.
translatiob typo :)
Also, if there is already a webtest named like this, should we be more specific explaining what is happening here?
Comment #9
ParisLiakos CreditAttribution: ParisLiakos commentedThe webtest named LocaleTranslationTest tests the interface translation..i could rename this to LocaleTranslationUiTest maybe?
but we already follow
core/lib/Drupal/Core
's namespaces in modules, like controllers, forms, plugins..so this is not something newComment #10
ParisLiakos CreditAttribution: ParisLiakos commentedRestoring tags and fixing typo
Comment #11
Gábor HojtsyYeah renaming the UI test to ...UiTest would be good :)
Comment #12
pwieck CreditAttribution: pwieck commented*UPDATED*
This patch fixed error
Warning: Invalid argument supplied for foreach() in Drupal\locale\LocaleTranslation->destruct() (line 80 of /xxx/xxx/xxx/drupal/core/modules/locale/lib/Drupal/locale/LocaleTranslation.php).
Comment #13
BerdirYes, that's exactly what this fixes.
Comment #14
ParisLiakos CreditAttribution: ParisLiakos commentedtotally forgot this sorry...
and just did #11 but eventually with the file moves i messed up the interdifff, really sorry..but its a small patch, so here it is, lets hope will have no problems
Comment #15
dawehnerOkay, let's keep it simple for now.
Comment #16
alexpottCommitted 90c2c23 and pushed to 8.x. Thanks!