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.
Just upgraded to v6.x-3.1 on a brand new site (empty db).
When I edit a new content type (admin/content/node-type/xxxxxx) for which Location settings have not been defined, I get the following error, and again on the next screen after updating and saving the location settings for the content type:
warning: trim() expects parameter 1 to be string, array given in /home/xxxx/public_html/sites/all/modules/location/location.inc on line 498.
Once the settings are saved though, the error does not appear again.
I am running:
- Drupal 6.17
- Ubuntu Lucid 10.04LTS
- Apache
- MySQL 5.1.4.1
- PHP 5.3.2 as fcgid
Comment | File | Size | Author |
---|---|---|---|
#1 | location-trim_warning-846604-1.patch | 865 bytes | rooby |
Comments
Comment #1
rooby CreditAttribution: rooby commentedWow I don't know how long that has been around.
Try this and see if it fixes your problem and doesn't cause others.
Seems to do it for me.
Comment #2
Carlos Miranda Levy CreditAttribution: Carlos Miranda Levy commentedThank you, this seems to fix it.
I have not receive any further errors.
The patch seems to work.
Comment #3
YesCT CreditAttribution: YesCT commentedComment #4
rooby CreditAttribution: rooby commentedCommitted to 5, 6 & HEAD.
http://drupal.org/cvs?commit=429474
http://drupal.org/cvs?commit=429470
http://drupal.org/cvs?commit=429472
Comment #6
rooby CreditAttribution: rooby commentedThe fix for this broke other things, see these issues:
#990804: When "Display full province name" is selected, parts of the administrative UI become disabled
#996898: State/province autocomplete not working
I have now committed a better fix that fixes those issues and this one.
The fix was taken from bdragon's DRUPAL-7--4 branch, where he had already fixed this.
http://drupal.org/cvs?commit=486596
http://drupal.org/cvs?commit=486594
http://drupal.org/cvs?commit=486600