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.
These warning pop up all over our tests: http://ci.aegirproject.org/view/Puppet/job/P%20Aegir_up%20aegir2-dev%20p...?
Comment | File | Size | Author |
---|---|---|---|
#7 | hosting-ip.patch | 896 bytes | chertzog |
#1 | hosting-ip-checks.patch | 2.75 KB | chertzog |
Comments
Comment #1
chertzogThe linked issue above is showing a 404.
But here is a patch that adds some checks as well as makes sure that what is being passed to foreach is an array.
Comment #2
anarcat CreditAttribution: anarcat commentedcould you actually reproduce the issue and fix it with the patch??
Comment #3
chertzogWhen creating a new server, i actually get the following error.
"warning: Invalid argument supplied for foreach() in /var/aegir/hostmaster-6.x-2.x/profiles/hostmaster/modules/hosting/server/hosting.ip.inc on line 51."
The offending lines are
Its assuming that $node->ip_addresses is set.
As for the line 39 error, it looks like its because the code checks if isset, not is_array.
Which btw, is different from the way its handled earlier in the function when checking for $node->ip_addresses.
Comment #4
lieb CreditAttribution: lieb commentedI am getting this error in 6.x-2.0-rc4 trying to update the properties of a pack server. I believe it is because a pack server does not have a valid IP to begin with. I will test the patch above and report back.
Comment #5
lieb CreditAttribution: lieb commentedI applied this patch on two different hostmaster's both configured with server packs and it appears to work. I no longer get the warning when saving a server.
Comment #6
anarcat CreditAttribution: anarcat commentedunfortunately, the patch doesn't apply anymore.
Comment #7
chertzogHere is an updated patch. It looks like the other stuff was fixed in a recent commit.
Comment #8
anarcat CreditAttribution: anarcat commentedpushed in 08c2986
Comment #9
ergonlogicI'm still seeing this in our tests, and I can't find that commit...
Comment #10
ergonlogicFixed in fb8c79ab. I only cast to array for the two lines where we do isset()'s, since it doesn't seem to make much sense after an is_array().
Tests are now clean again.
Comment #11
lieb CreditAttribution: lieb commentedDid this make it into RC5? I am getting this in RC5 when I do a 'hosting import' on an existing site that I just migrated with provision-migrate
Comment #12
anarcat CreditAttribution: anarcat commentedactually, bits of this *didn't* get into rc5 because i forgot a push in the office. the missing commit, now pushed, is 23d5153