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).
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

falcon’s picture

Status: Active » Postponed (maintainer needs more info)

I'm not able to reproduce this one.

greylogic’s picture

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.

TimVS’s picture

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

falcon’s picture

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

Thanks, seems to be php 5.4 problem

fmas786’s picture

I have the same problem. Any solution?

varshith’s picture

subscribe

lakshminp’s picture

Status: Active » Needs review
FileSize
491 bytes

possible fix.

airliner’s picture

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

Thanks lakshminp, it works fine for me.

Andy Dorman’s picture

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.

Sivaji_Ganesh_Jojodae’s picture

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...

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

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

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