I just downloaded drupal 7.69 and tried to configure it. It gives me a page full of the same error:

Notice: Trying to access array offset on value of type int in element_children() (line 6656 of /Applications/MAMP/htdocs/KSnew/includes/common.inc).

Here's the relevant part of the code in common.inc, with line numbers:

6648 function element_children(&$elements, $sort = FALSE) {
6649   // Do not attempt to sort elements which have already been sorted.
6650   $sort = isset($elements['#sorted']) ? !$elements['#sorted'] : $sort;
6652   // Filter out properties from the element, leaving only children.
6653   $children = array();
6654   $sortable = FALSE;
6655   foreach ($elements as $key => $value) {
6656     if ($key === '' || $key[0] !== '#') {
6657       $children[$key] = $value;
6658       if (is_array($value) && isset($value['#weight'])) {
6659         $sortable = TRUE;
6660       }
6661     }
6662   }

Is this a Drupal error??


1 Answer 1


I think it is PHP related. According to the Drupal 7 php requirements PHP 7.4 is not fully supported. If you are running on 7.4 perhaps try downgrading it to 7.3 and see if it makes a difference.

This is probably the relevant issue that you encountered. Alternatively see if you can use the latest patch in there and post your findings so you can help move the issue forward.

  • You are absolutely right! My former installation of MAMP was using PHP 7.3.8 and I did not have this problem.
    – ksmithcamp
    Jan 27, 2020 at 13:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.