SystemMainBlock::build does not always return an array.

But documentation clearly says it should:
https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Block%21B...

It can produce errors like this:
https://www.drupal.org/node/2812721

Members fund testing for the Drupal project. Drupal Association Learn more

Comments

jiv_e created an issue. See original summary.

jiv_e’s picture

jiv_e’s picture

Status: Active » Needs review
FileSize
514 bytes
jiv_e’s picture

Dinesh18’s picture

I have verified the API and the function doesn't return array. I manually reviewed the patch and it looks like the solution provided by you is perfect.
+1 to RTBC. Let's wait for some other to review the patch as well.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.0-alpha1 will be released the week of July 31, 2017, which means new developments and disruptive changes should now be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.