Hi,

I get a bunch of warnings, when ever i take a quiz with multichocie question. I created a quiz with just one multichoice question. when i take the quiz i get the following warnings.

I am using PHP 5.4.3.

    Warning: Invalid argument supplied for foreach() in element_children() (line 6282 of /srv/http/ephemeral/includes/common.inc).
    Warning: Illegal string offset '#children' in drupal_render() (line 5761 of /srv/http/ephemeral/includes/common.inc).
    Warning: Illegal string offset '#children' in drupal_render() (line 5771 of /srv/http/ephemeral/includes/common.inc).
    Warning: Illegal string offset '#children' in drupal_render() (line 5809 of /srv/http/ephemeral/includes/common.inc).
    Warning: Illegal string offset '#printed' in drupal_render() (line 5816 of /srv/http/ephemeral/includes/common.inc).
    Warning: Invalid argument supplied for foreach() in element_children() (line 6282 of /srv/http/ephemeral/includes/common.inc).
    Warning: Illegal string offset '#children' in drupal_render() (line 5761 of /srv/http/ephemeral/includes/common.inc).
    Warning: Illegal string offset '#children' in drupal_render() (line 5771 of /srv/http/ephemeral/includes/common.inc).
    Warning: Illegal string offset '#children' in drupal_render() (line 5809 of /srv/http/ephemeral/includes/common.inc).
    Warning: Illegal string offset '#printed' in drupal_render() (line 5816 of /srv/http/ephemeral/includes/common.inc).
    Warning: Invalid argument supplied for foreach() in element_children() (line 6282 of /srv/http/ephemeral/includes/common.inc).
    Warning: Illegal string offset '#children' in drupal_render() (line 5761 of /srv/http/ephemeral/includes/common.inc).
    Warning: Illegal string offset '#children' in drupal_render() (line 5771 of /srv/http/ephemeral/includes/common.inc).
    Warning: Illegal string offset '#children' in drupal_render() (line 5809 of /srv/http/ephemeral/includes/common.inc).
    Warning: Illegal string offset '#printed' in drupal_render() (line 5816 of /srv/http/ephemeral/includes/common.inc).

Comments

Status:Active» Postponed (maintainer needs more info)

I'm not able to reproduce this one.

I guess, this may have to do with new version of php (5.4) http://mark-story.com/posts/view/new-errors-in-php-5-4

May be somewhere quiz may pass non-array types to drupal_render(&$elements). I am just guessing. Iwill take a look at this weekend, if i get a chance.

Dit you find the reasson of the error? because I`ve got the same problem. Also php 5.4

Priority:Normal» Minor
Status:Postponed (maintainer needs more info)» Active

Thanks, seems to be php 5.4 problem

I have the same problem. Any solution?

subscribe

Status:Active» Needs review
StatusFileSize
new491 bytes

possible fix.

Version:7.x-4.0-alpha5» 7.x-4.0-alpha12
Component:Code - Multichoice» Code - other

Thanks lakshminp, it works fine for me.

We are using 7.x-4.0-alpha with postgreSQL and PHP 5.4 and this fix worked great for us as well.

Hope we see it in the next release.

Status:Needs review» Fixed
Issue tags:+php5.4

Thanks for the patch. Fix committed to git.

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

  • Commit c36b3a8 on 7.x-4.x, 7.x-5.x by sivaji: Issue #1630032 by lakshminp | greylogic: Fixed Illegal string offset...