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)

Issue fork ctools-3413093

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

arif.zisu created an issue. See original summary.

arif.zisu’s picture

Priority: Major » Critical
arif.zisu’s picture

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.

viren18febS made their first commit to this issue’s fork.

viren18febs’s picture

Status: Needs work » Needs review
StatusFileSize
new437 bytes

i have added a patch with these changes .