Osclass Support Forums

General osclass questions => Report bug => Topic started by: dsf on June 30, 2021, 05:12:15 PM

Title: Notice in PHP 7.4
Post by: dsf on June 30, 2021, 05:12:15 PM
Hello.

Not sure it comes from 4.4 or some plugin or even my theme, still if you could help ...

Quote
PHP Notice:  Trying to access array offset on value of type bool in /home/oc-includes/osclass/ItemActions.php on line 1778


Code: [Select]
     } else {
        $_category        = Category::newInstance()->findByPrimaryKey($aItem[ 'catId' ]);
   1778->     $aItem[ 'dt_expiration' ] = $_category[ 'i_expiration_days' ];
      }

This Notice doesn't show with PHP 7.3.x

Thanks


(could that be a category with no expiration (zero)? )
Title: Re: Notice in PHP 7.4
Post by: MB Themes on June 30, 2021, 06:33:42 PM
Will be fixed in 4.5, but root problem is in your data I think.
Title: Re: Notice in PHP 7.4
Post by: dsf on June 30, 2021, 07:09:31 PM
Will be fixed in 4.5, but root problem is in your data I think.

Cryptic reply. Can you expand pls?

 ;D
Title: Re: Notice in PHP 7.4
Post by: MB Themes on June 30, 2021, 07:53:40 PM
Well, no, as time was spent on it already and will be fixed in next update, but you can use @ sign to avoid such notices