I have an event giving me this error. The event has been working until now and I can't figure out how I might have broken it.

Does anyone have any ideas of how to debug the error?

Many thanks :-)

Symphony Recoverable Error: Argument 1 passed to SectionEvent::__doit() must be of the type array, string given, called in /srv/www/ on line 247 and defined
An error occurred in /srv/www/ around line 292
287 * be passed to this function.
288 * @throws Exception
289 * @return XMLElement
290 * The result of the Event
291 */
292 public function __doit(array $fields = array(), XMLElement &$result, $position = null, $entry_id = null)
293 {
294 $post_values = new XMLElement('post-values');
296 if (!is_array($this->eParamFILTERS)) {

Has the frontend markup changed? There's a chance that no data is being passed from the frontend anymore.

@brendo I've fixed this error for Stuart, but I still think it's a bug in Symphony (at least needs a user-friendly error)

Apparently he changed the events to support multiple, however he didn't change the frontend to reflect that. So when he was sending a single form using <input name='fields[name]'/> it throws the above error making the fields into an array or removing the multiple resolves the above issue.

Ah, I see, I've pushed a commit to the 2.6.x branch for 2.6.2 that should handle this better :) Thanks for the heads up!

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details