Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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).
Comment | File | Size | Author |
---|---|---|---|
#7 | 1630032-fix-for-illegal-string-offset-warning-6818331.patch | 491 bytes | lakshminp |
Comments
Comment #1
falcon CreditAttribution: falcon commentedI'm not able to reproduce this one.
Comment #2
greylogic CreditAttribution: greylogic commentedI 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.
Comment #3
TimVS CreditAttribution: TimVS commentedDit you find the reasson of the error? because I`ve got the same problem. Also php 5.4
Comment #4
falcon CreditAttribution: falcon commentedThanks, seems to be php 5.4 problem
Comment #5
fmas786 CreditAttribution: fmas786 commentedI have the same problem. Any solution?
Comment #6
varshith CreditAttribution: varshith commentedsubscribe
Comment #7
lakshminp CreditAttribution: lakshminp commentedpossible fix.
Comment #8
airliner CreditAttribution: airliner commentedThanks lakshminp, it works fine for me.
Comment #9
Andy Dorman CreditAttribution: Andy Dorman commentedWe 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.
Comment #10
Sivaji_Ganesh_Jojodae CreditAttribution: Sivaji_Ganesh_Jojodae commentedThanks for the patch. Fix committed to git.