3 users online. Create an account or sign in to join them.Users

Search

I tried searching the forums for a while, but I couldn’t find a fix.

I get an error any time this form is submitted, even if the image field is left blank.

It is included in the data source.

I’ve got a section with a few text fields, and an image upload field(the default symphony field). Also, I’m using the 2.0.7 official release.

<form action="" method="post" enctype="multipart/form-data">  
<input name="MAX_FILE_SIZE" type="hidden" value="5242880" />
...(some text fields)...

<p>
    <label>Picture<br />
        <input name="fields[picture]" type="file" />
    </label>
</p>                 
&lt;script type="text/javascript"   src="http://api.recaptcha.net/challenge?k={/data/recaptcha}">
&lt;/script>
<input type="submit" name="action[save-story]" id="submit" value="SUBMIT" />

The error I’m getting:

strlen() expects parameter 1 to be string, array given
C:wampwwwsym_katiesymphonylibtoolkitclass.general.php line 590

585     Return: rebuilt array
586     
587     ***/
588     public static function array_to_xml(XMLElement $parent, array $data, $validate=false) {
589         foreach ($data as $element_name => $value) {
590             if (strlen($value) == 0) continue;
591             
592             if (is_int($element_name)) {
593                 $child = new XMLElement('item');
594                 $child->setAttribute('index', $element_name + 1);

EDIT: Found the solution here: Closed Ticket: Submitting … form issues…

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.2 or above
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.0 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details