Warning: Narrowing occurred during type inference of ZEND_FETCH_DIM_W

  • Posts: 183
  • Thank you received: 10
  • Hikashop Business
3 months 3 weeks ago #358065

-- HikaShop version -- : 5.0.2
-- Joomla version -- : 5.0.1
-- PHP version -- : 8.2.13
-- Browser(s) name and version -- : Chrome

I get multiple warnings on my local machine. Is there some way to fix this?

Warning: Narrowing occurred during type inference of ZEND_FETCH_DIM_W. Please file a bug report on github.com/php/php-src/issues in C:\wamp64\www\r2hbiz\administrator\components\com_hikashop\classes\category.php on line 1085

Warning: Narrowing occurred during type inference of ZEND_FETCH_DIM_W. Please file a bug report on github.com/php/php-src/issues in C:\wamp64\www\r2hbiz\administrator\components\com_hikashop\classes\product.php on line 4315

Warning: Narrowing occurred during type inference of ZEND_FETCH_DIM_RW. Please file a bug report on github.com/php/php-src/issues in C:\wamp64\www\r2hbiz\administrator\components\com_hikashop\classes\currency.php on line 2450

Regards

Please Log in or Create an account to join the conversation.

  • Posts: 81597
  • Thank you received: 13081
  • MODERATOR
3 months 3 weeks ago #358066

Hi,

That's great news you're getting these.
We had people reporting such issues in the past, but the error message was not precise enough to understand where the problem was.
We reported the issue on github at the time:
github.com/php/php-src/issues/8251
At that time, the developers there pushed a patch to PHP 8.1.6 in order to improve the error message.
Since then, no one else using HikaShop reported the issue, however others were able to move forward on github and some fixes have been included in PHP 8.2.14 or 8.2.15, as stated there.
So I went to php.watch/versions/8.2/releases/8.2.14 and saw the line:

Fixed GH-8251: Narrowing occurred during type inference of ZEND_FETCH_DIM_W in 423a1e586e
So update to PHP 8.2.14 and it should help.
If you still have the messages after the update, then we'll have to look deeper into it and probably fill in another bug report to the PHP project's github.

Last edit: 3 months 3 weeks ago by nicolas.

Please Log in or Create an account to join the conversation.

  • Posts: 183
  • Thank you received: 10
  • Hikashop Business
3 months 3 weeks ago #358078

Hi,

I mainly had the problems manually installing Hikashop.
In PHP 8.2.14 the warnings are gone!
Setting PHP 8.3.0 results in the same warnings again.

Just to let you know.

Thanks!

Please Log in or Create an account to join the conversation.

  • Posts: 81597
  • Thank you received: 13081
  • MODERATOR
3 months 3 weeks ago #358079

Hi,

Thanks for the feedback.

The patch was made on November 28th:
github.com/php/php-src/issues/8251
PHP 8.2.14 was released on the 8th of December:
php.watch/versions/8.2
PHP 8.3.0 was released on the 23rd of November:
php.watch/versions/8.3
You would have to update to PHP 8.3.1, which was released on the 7th of December, in order to get the patch on 8.3 :
php.watch/versions/8.3/releases/8.3.1

The following user(s) said Thank You: Rixters

Please Log in or Create an account to join the conversation.

Time to create page: 0.060 seconds
Powered by Kunena Forum