warning: urlencode() expects parameter 1 to be string, array given in /home/hailappo/public_html/modules/storm/storm.module on line 678.

I have tried this on 2 separate installations with the same result.

This error appears when adding CCK fields to a content type. It does not have to be a Storm content type, it can be any content type. Upon saving the field, the error is thrown.

Can you provide any guidance?

Comments

juliangb’s picture

Which version of PHP are you running?

Which other modules are installed?

Is a backtrace available for the error?

1959mvp’s picture

PHP Version 5.2.13
CCK
Views
Panels
CCK add-ons
Private Message
SitemapXML
Content Permissions
Workflow
Token
Imagefield
Pathauto
Webform

I do not have a backtrace environment available.

juliangb’s picture

Status: Active » Postponed (maintainer needs more info)

I was unable to reproduce this error on testing.

juliangb’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

Cannot reproduce. Please reopen if further info is available.

Bill Lea’s picture

Status: Closed (fixed) » Needs work

I have encountered this exact error. I went to define a CCK text field and the error appeared.
The error message is:

urlencode() expects parameter 1 to be a string array given in ../storm/storm.module line 694.

The error has appeared for text fields, I have not tried to create other types of fields. I'd apprecieate any help
Bill Lea

juliangb’s picture

Title: warning: urlencode() expects parameter 1 to be string, array given in /home/public_html/modules/storm/storm.module on l » PHP error when adding CCK field with Storm enabled
Status: Needs work » Active

Bill, could you confirm the version of Storm you are using please?

Bill Lea’s picture

I have been doing a bit of testing. The error occurs when the dashboard is enabled.

I am using Storm 6.x-1.34 but the section failing is Dashboard 6.x-1.0. I'm not sure what is happening the function that is failing is an icon function. I am not sure why an icon function would be called when a new content type is defined. But the problem lies with the Dashboard submodule if that's the correct term. As a workaround I'll just disable it, as I don't think I need it's functionality -- if it gets fixed I can always turn it back on.

juliangb’s picture

Project: Storm » Dynamic Dashboard for Storm (Project Management)
Version: 6.x-1.33 » 6.x-1.x-dev
Component: Storm.module » Code

Moving to Storm Dashboard project.

kfritsche’s picture

Project: Dynamic Dashboard for Storm (Project Management) » Storm
Version: 6.x-1.x-dev » 6.x-2.x-dev
Component: Code » Storm.module
Status: Active » Needs review
StatusFileSize
new1.13 KB

This is a problem with storm_icon_l.

To reproduce it, you can open any list or any page, with storm icons on it and append following string to the url
?destinations[0]=a&destinations[1][asd]=a&destinations[1][3]=b
Destinations is used by CCK, but maybe other modules also uses array values in GET requests and we should set the correct values for the current page.
To achieve i added a new function, which forms array values into a value.
Also it unsets a maybe given destination.

Patch attached for 6.x-2.x

Status: Needs review » Needs work

The last submitted patch, icon_urlencode-#831572-9.patch, failed testing.

juliangb’s picture

Would you mind renaming the filename of the patch to remove the #?

I think that is what is breaking the link to it.

kfritsche’s picture

StatusFileSize
new1.13 KB

I think so, too. :)

kfritsche’s picture

Status: Needs work » Needs review
kfritsche’s picture

Status: Needs review » Fixed

commited to 6.x-2.x

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.