Skip to content

Narrowing occurred during type inference of ZEND_FETCH_DIM_W #8251

Closed
@hikashop-nicolas

Description

@hikashop-nicolas

Description

We're developing an ecommerce solution called HikaShop for the Joomla CMS. We've been at it for more than 10 years.
Several of our users report a warning happening when upgrading to PHP8 which says:
Warning: Narrowing occurred during type inference of ZEND_FETCH_DIM_W. Please file a bug report on bugs.php.net in /xxx/xxx/xxx/administrator/components/com_hikashop/helpers/helper.php on line 1381

You can read the reports here:
https://www.hikashop.com/forum/install-update/903846-update-hikashop-php.html

Unfortunately, we're not able to reproduce the warning on our end as it apparently only happens in some rare case. Also, it happens on a line which only has this:
include_once($include_file);

It's basically the main line of our main helper file to load all the other files (controllers, models, views, other helpers, etc). So the warning message doesn't help much. We could just add a @ to hide the warning, but since the message says to file a bug report, I'm doing that hoping someone has a better idea.

PHP Version

PHP 8

Operating System

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions