Attempt to assign property "type" on bool in ctools_content_render(

Created on 8 January 2024, about 1 year ago
Updated 11 January 2024, about 1 year ago

Getting error after update php version to 8.1

Error: Attempt to assign property "type" on bool in ctools_content_render() (line 303 of docroot/sites/all/modules/contrib/ctools/includes/content.inc)

🐛 Bug report
Status

Needs review

Version

1.21

Component

Code

Created by

🇮🇳India arif.zisu Kolkata

Live updates comments and jobs are added and updated live.
  • PHP 8.1

    The issue particularly affects sites running on PHP version 8.1.0 or later.

Sign in to follow issues

Comments & Activities

  • Issue created by @arif.zisu
  • 🇮🇳India arif.zisu Kolkata

    diff --git a/docroot/sites/all/modules/contrib/ctools/includes/content.inc b/docroot/sites/all/modules/contrib/ctools/includes/content.inc
    index 49c356502..0c67c91d0 100644
    --- a/docroot/sites/all/modules/contrib/ctools/includes/content.inc
    +++ b/docroot/sites/all/modules/contrib/ctools/includes/content.inc
    @@ -293,7 +293,7 @@ function ctools_content_render($type, $subtype, $conf, $keywords = array(), $arg

    $content = $function($subtype, $conf, $args, $pane_context, $incoming_content);

    - if (empty($content)) {
    + if (empty($content) || !is_object($content)) {
    return;
    }

    This patch solved my issue.

  • First commit to issue fork.
  • Status changed to Needs review about 1 year ago
  • Open in Jenkins → Open on Drupal.org →
    Core: 7.x + Environment: PHP 8.0 & MySQL 5.7
    last update about 1 year ago
    59 pass
  • 🇮🇳India viren18febS

    i have added a patch with these changes .

Production build 0.71.5 2024