CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 ccconvertencoding problem: error when submitting multiple valued checkboxlist

Print topic Send  topic

Author Message
dirksamson

Posts: 32
Posted: 05/11/2006, 9:48 AM

When submitting a checkboxlist with multiple values checked I get the error:

Notice: Array to string conversion in <snip>\Common.php on line 1706

Line 1706 is the CConvertEncoding function which is trying to call mb_convert_encoding with an array as first parameter where it expects a string. Debugging further proved that the culprit is: $_POST = CCConvertEncodingArray($_POST, $from, $to);
which is called in common.php.

The POST parameter of the checkboxlist is an array and not a string. What am I doing wrong here? (CC 3.0.3.1).

_________________
Dirk
View profile  Send private message
dirksamson

Posts: 32
Posted: 05/12/2006, 2:59 AM

It get's worse: by returning the string "Array" instead of the array that is passed to the CCConvertEncoding method, the method actually "destroys" my data.

I suppose this method will have to be changed so that it can (recursively) handle (multidimensional) arrays. My quickfix to prevent the function from destroying my form-data:

if (is_array($text)) return $text;
_________________
Dirk
View profile  Send private message
WKempees
Posted: 05/12/2006, 11:10 AM

Please post to support at http://support.yessoftware.com
to see if this is really an error.
They will give you the solution.
Which you then post back here of course!

Also check the Help files the article on handling multi-select box.
See if you are doing things right.
Multi checked check boxes have a different handling method, he will normaly
only pass one value, you have to do some extra handling to get all checked
values.

Walter
I am going out so sorry for not giving better directions.




"dirksamson" <dirksamson@forum.codecharge> schreef in bericht
news:544636ac28a3db@news.codecharge.com...
> When submitting a checkboxlist with multiple values checked I get the
> error:
>
> Notice: Array to string conversion in <snip>\Common.php on line 1706
>
> Line 1706 is the CConvertEncoding function which is trying to call
> mb_convert_encoding with an array as first parameter where it expects a
> string.
> Debugging further proved that the culprit is: $_POST =
> CCConvertEncodingArray($_POST, $from, $to);
> which is called in common.php.
>
> The POST parameter of the checkboxlist is an array and not a string. What
> am I
> doing wrong here? (CC 3.0.3.1).
>
> _________________
> Dirk
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>


Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.