Problem/Motivation

PHP warnings during static code analysis using phan with messages:
"Expected an object instance when accessing an instance property, but saw an expression $node with type bool" in i18n_node/i18n_node.module
"Expected an object instance when accessing an instance property, but saw an expression $format with type false" in
i18n_string/i18n_string.module
"Expected an object instance when accessing an instance property, but saw an expression $translation_term with type false" in
i18n_taxonomy/i18n_taxonomy.admin.inc

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Dmitrii_Zadorozhnyi created an issue. See original summary.

Dmitrii_Zadorozhnyi’s picture

I would suggest to apply a patch.

Dmitrii_Zadorozhnyi’s picture

FileSize
3.36 KB

Patch with some changes

apaderno’s picture

Issue tags: -PHP8.0, -PHP 8.1 +PHP 8.0
joseph.olstad’s picture

looks good, haven't tested it yet but the automated tests do pass all green for php 8.1, so I'm triggering some more tests, 5.3 , 7.4.

Status: Needs review » Needs work

The last submitted patch, 3: i18-3273941-php-warnings-during-1.patch, failed testing. View results

joseph.olstad’s picture

joseph.olstad’s picture

Status: Needs work » Reviewed & tested by the community

Ignore the fail, it's changes to the ci runner not the patch causing the fails.

joseph.olstad’s picture

Status: Reviewed & tested by the community » Fixed
joseph.olstad’s picture

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.